Displaying values on a screen or in a file (DISPLAY)
You can display the
value of a data item on a screen or
write it to a file by using the DISPLAY
statement.
About this task
Display "No entry for surname '" Customer-Name "' found in the file.".
In the example above, if the content of data item Customer-Name is JOHNSON, then the statement displays the following message on the screen:
No entry for surname 'JOHNSON' found in the file.
To write data to a destination other than the screen, use the UPON
phrase. For example,
the following statement writes to the file that
you specify as the value of the SYSOUT environment variable:
Display "Hello" upon sysout.
When
you display the value of a USAGE NATIONAL
data
item, the output data is converted to the code page that is associated
with the current locale.
Related tasks
Converting national to alphanumeric (DISPLAY-OF)
Coding COBOL programs to run under CICS
Converting national to alphanumeric (DISPLAY-OF)
Coding COBOL programs to run under CICS
Related references
Runtime environment variables
DISPLAY statement (COBOL for Linux on x86 Language Reference)
Runtime environment variables
DISPLAY statement (COBOL for Linux on x86 Language Reference)