Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1.2.11 Allocated Length (IBM i only)

What is it for?

The Allocated length is only used when creating files on IBM i. It defines the space to be reserved for variable-length columns in each row. Column values with lengths less than or equal to the allocated value are stored in the fixed-length portion of the row. Column values with lengths greater than the allocated value are stored in the variable-length portion of the row and require additional input/output operations to retrieve.

Rules

...

The allocated length cannot exceed the 1.2.4 Field Length.

Allocated length is only available with these field types: String, NVarChar, VarBinary, CLOB & BLOB.

...

If the field has the attribute SUNI, the allocated field length is specified in characters, not bytes.

For example:

If you enter an allocated length of 32000, and the file is created via DDS, VARLEN(32000) will be specified for the field definition.

...