Variable-Length Fields
You can bring a variable-length field into your program if you specify the CVTOPT(*VARCHAR) option on the CRTCBLMOD or CRTBNDCBL command, or the VARCHAR option of the PROCESS statement. A variable-length field that you extract from an externally-described file becomes a fixed-length group item in your program.
See the IBM® Rational® Development Studio for i: ILE COBOL Programmer's Guide for more detailed information about these fields.
When you perform a WRITE operation before explicitly moving a record to the record area, you will often write blanks, which have a hexadecimal value of 40 (X'40'). For variable-length fields, this means that X'4040' will be used as the current length of the field.
X'4040' translates to a decimal value of 16 448, which would probably exceed the maximum defined length of the variable-length field. This causes the WRITE operation or subsequent CLOSE operation to fail with a file status of 90.