Format 1 - Data Transfer
DISPLAY Statement - Format 1 - Data Transfer .------------------. V | >>-DISPLAY----+-identifier-1-+-+--------------------------------> '-literal-1----' >--+------------------------------------+-----------------------> '-+------+--+-mnemonic-name--------+-' '-UPON-' | (1) | '-environment-name-----' >--+-----------------------------+--+-----------------+-------->< | (2) | | (1) | '-+------+--NO--ADVANCING-----' '-END-DISPLAY-----' '-WITH-'
- IBM® Extension
- Syntax-checked only.
- identifier-1
- IBM Extension
IBM Extension If the description of identifier-1 contains a TYPE clause, the type-name specified in that clause must be elementary. End of IBM Extension
End of IBM ExtensionIf it is numeric and is not described as external decimal, the identifier is converted automatically to external format, as follows:- Binary or internal decimal items are converted to
external decimal. Negative signed values cause a low-order sign to
be displayed. For example, if SIGN with SEPARATE CHARACTER is not
specified and two numeric items have the values -34 and 34, they are
displayed as 3M and 34, respectively. If SIGN with SEPARATE CHARACTER
is specified, a + or a - sign is displayed as either leading or trailing,
depending on how the number was specified. Note: Group items containing packed, binary, floating-point, or date-time data (COMP, COMP-1, COMP-2, COMP-3, PACKED-DECIMAL, BINARY, COMP-4, or COMP-5) should not be displayed on a display station. Such data can contain display station control characters which can cause undesirable and unpredictable results.
- IBM ExtensionIBM Extension Can be an internal or external floating-point data item. Internal floating-point numbers are converted to external floating-point numbers for display, such that:
- A COMP-1 item will display as if it had an external floating-point PICTURE clause of -.9(8)E-99
- A COMP-2 item will display as if it had an external floating-point PICTURE clause of -.9(17)E-999
It is possible that when an external floating-point literal is displayed, slight inaccuracies can result. This is especially true if the DISPLAY takes place after a MOVE. The floating-point data type is an approximation, and when an external floating-point literal is moved, it is first converted to a true floating-point value (IEEE), which can also affect its accuracy.
For example, consider the following DISPLAY:End of IBM Extension
The displayed result after the MOVE is:77 external-float-1 PIC +9(3).9(13)E+9(3). MOVE +123455779012.3453E+297 to external-float-1. DISPLAY "EXTERNAL-FLOAT-1=" external-float-1.EXTERNAL-FLOAT-1=+123.4557790123452E+306End of IBM Extension - No other identifiers require conversion.
IBM ExtensionIBM Extension- Elementary DBCS and national data items are transferred to the output device. DBCS, national, and SBCS operands can be specified using a single DISPLAY verb. Data output will be converted to the code set specified by the job's current CCSID.
End of IBM Extension - Binary or internal decimal items are converted to
external decimal. Negative signed values cause a low-order sign to
be displayed. For example, if SIGN with SEPARATE CHARACTER is not
specified and two numeric items have the values -34 and 34, they are
displayed as 3M and 34, respectively. If SIGN with SEPARATE CHARACTER
is specified, a + or a - sign is displayed as either leading or trailing,
depending on how the number was specified.
- literal-1
- May be any figurative constant. When a figurative constant is specified,
only a single occurrence of that figurative constant is displayed.
Each numeric literal must be an unsigned integer.
IBM ExtensionIBM Extension Floating-point literals are allowed. End of IBM Extension
End of IBM ExtensionIBM ExtensionIBM Extension Signed noninteger numeric literals are allowed. End of IBM Extension
End of IBM ExtensionIBM ExtensionIBM Extension
DBCS
and national literals are allowed. The ALL figurative constant can
be used with DBCS and national literals in a DISPLAY verb.
End of IBM ExtensionEnd of IBM Extension - UPON
- The UPON phrase specifies a mnemonic-name that must be associated
with either the workstation (REQUESTOR) or the system operator's message
queue (CONSOLE or SYSTEM-CONSOLE). IBM Extension
IBM Extension environment-name May be specified in place of mnemonic-name. Valid environment-names are CONSOLE and SYSOUT. End of IBM Extension
End of IBM ExtensionWhen the UPON phrase is omitted, the DISPLAY statement sends output to the REQUESTOR.
- WITH NO ADVANCING
- This phrase is syntax checked only and ignored. For a description of a functional WITH NO ADVANCING phrase see Format 4 – Session I/O.
