Length of Nonnumeric Literals

Solution:

Amend your source program by creating a new data item in the Working-Storage Section, and assigning the literal to the VALUE clause. If you then use the data item in the Procedure Division in the place of the original long literal, this COBOL system will accept your source program.

Example:

The RM/COBOL system accepts the following line of code but this COBOL system does not:

 move "abc...aa" to screen-buffer.

where abc...aa represents a literal of 1500 characters.

Change the code to:

 move long-literal-1 to screen-buffer.

Define a new item in the Working-Storage section of your source program:

 01 long-literal-1  pic x(1500) value "abc...aa". 

You can now submit your amended RM/COBOL source program to this COBOL system and it will be accepted successfully.