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-'
Notes:
+-------------------------------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----------------------------+
If it is numeric and is not described as external decimal, the identifier is converted automatically to external format, as follows:
+-------------------------------IBM Extension--------------------------------+
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:
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.
The displayed result after the MOVE is:
EXTERNAL-FLOAT-1=+123.4557790123452E+306
+----------------------------End of IBM Extension----------------------------+
+-------------------------------IBM Extension--------------------------------+
+----------------------------End of IBM Extension----------------------------+
Each numeric literal must be an unsigned integer.
+-------------------------------IBM Extension--------------------------------+
Floating-point literals are allowed.
Signed noninteger numeric literals are allowed.
DBCS and national hexadecimal literals are allowed. The ALL figurative constant can be used with DBCS and national hexadecimal literals in a DISPLAY verb.
+----------------------------End of 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----------------------------+
When the UPON phrase is omitted, the DISPLAY statement sends output to the REQUESTOR.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.