The DISPLAY . . . UPON statement causes individual data items to be displayed on an appropriate hardware device.
Format 1:Display Upon System-Name
The DISPLAY statement transfers the contents of each sending operand, identifier-1 or literal-1 to the hardware device in the order listed.
In a Format 1 DISPLAY statement, the contents of the data item referred to by identifier-1 or the value of literal-1 is transmitted to the standard output device. The presence of the UPON phrase may affect which output device is used.If mnemonic-name-3 is used in the UPON phrase, it must have been defined in the SPECIAL-NAMES paragraph of the Environment Division with the low-volume-I-O-name-1 IS mnemonic-name-3 clause.The associated low-volume-I-O-name-1 must be CONSOLE or SYSOUT.
The size of a data transfer is determined at program execution time; see the RM/COBOL User’s Guide for details. If the size of the data item being transferred is not the same as that determined, one of the following applies:
When the DISPLAY statement contains more than one operand, the size of the sending item is the sum of the sizes of the operands, and the values of the operands are transferred in the sequence in which the operands are encountered without modifying the positioning of the cursor between the successive operands.
If the WITH NO ADVANCING phrase is not specified, the positioning of the standard output device is reset to the leftmost position of the next line following the transfer of the last operand of the DISPLAY statement.
If the WITH NO ADVANCING phrase is specified, the standard output device remains positioned at the character position immediately following the last character of the last operand displayed. DISPLAY . . . UPON CONSOLE is treated as if CONSOLE IS CONSOLE was specified in the SPECIAL-NAMES paragraph if CONSOLE has not been otherwise defined.
DISPLAY . . . UPON SYSOUT is treated as if SYSOUT IS SYSOUT was specified in the SPECIAL-NAMES paragraph if SYSOUT has not been otherwise defined.
DISPLAY . . . UPON Statement Examples
COBOL Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-CICS Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||IBM-JCL Interview Questions|
|DB2 Using SQL Interview Questions||IBM-JCL&VSAM Interview Questions|
|IBM Mainframe Interview Questions||COBOL, CICS, JCL, VSAM, DB2 Interview Questions|
|DB2 SQL Programming Interview Questions||IMS/DB Interview Questions|
|Mainframe DB2 Interview Questions|
Procedure Division Statements
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.