VARYING{(2 | 4)}

The VARYING keyword indicates that a character, graphic, or UCS-2 field, defined on the definition specifications, should have a variable-length format. If this keyword is not specified for character, graphic, or UCS-2 fields, they are defined as fixed length.

The parameter of the VARYING keyword indicates the number of bytes used to store the current length of the variable-length item. If you specify VARYING without a parameter, a size of 2 is assumed if the specified length is between 1 and 65535; otherwise, a size of 4 is assumed. You can specify any form of the VARYING keyword for definitions whose length is between 1 and 65535. The VARYING(2) keyword cannot be specified for definitions whose length is greater than 65535 since 4 bytes are required to store the length.

For more information, see Variable-Length Character, Graphic and UCS-2 Formats.



[ Top of Page | Previous Page | Next Page | Contents | Index ]