CHAR

The data field contains character data. The length, which is optional, is a maximum length. Note the following regarding length:

  • If a length is not specified, then it is derived from the POSITION specification.

  • If a length is specified, then it overrides the length in the POSITION specification.

  • If no length is given and there is no POSITION specification, then CHAR data is assumed to have a length of 1, unless the field is delimited:

    • For a delimited CHAR field, if a length is specified, then that length is used as a maximum.

    • For a delimited CHAR field for which no length is specified, the default is 255 bytes.

    • For a delimited CHAR field that is greater than 255 bytes, you must specify a maximum length. Otherwise you will receive an error stating that the field in the data file exceeds maximum length.

The syntax for the CHAR data type is:

See Also:

"Specifying Delimiters"