COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-45
DISPLAY
DISPLAY
DISPLAY delivers a small amount of data (such as an error message) to a terminal, a
printer, or another process.
identifier
is the identifier of any data item except an index data item.
literal
is a literal or figurative constant name.
mnemonic-name
is the device on which the process displays the data. You must define mnemonic-
name in the SPECIAL-NAMES paragraph of the Environment Division. When you
omit mnemonic-name, the process delivers the data to its output file, typically its
home terminal.
NO ADVANCING
specifies that the device to which the display is directed is not reset to the next line
after the data is displayed.
The DISPLAY statement in Example 9-3 delivers an error message to the output file of
a process.
Example 9-13. DISPLAY Statement
IF IO-STATUS = "23"
DISPLAY "I-O ERROR " IO-STATUS
" - NO RECORD FOR KEY = " INVOICE-NUMBER
END-IF
DISPLAY
identifier
literal
UPON
NO
ADVANCING
mnemonic-name
WITH
VST144.vsd