COBOL/400 Language Help
- Description
- Format 1 of the DISPLAY statement transfers the data in the
sending field to the output device. The size of the sending field is
the total character count of all operands listed. If the hardware
device is capable of receiving data of the same size as the data item being
transferred, then the data item is transferred. If the hardware device
is not capable of receiving data of the same size as the data item being
transferred, then one of the following applies:
- If the total character count is less than the device maximum logical
record size, the remaining rightmost characters are padded with spaces.
- If the total character count exceeds the maximum, as many records are
written as are needed to display all operands. Any operand being
printed or displayed when the end of a record is reached is continued in the
next record.
After the last operand has been transferred to the output device, the
device is reset to the leftmost position of the next line of the
device.
Format 1 (Data Transfer)
*--------------*
V +
->->--DISPLAY--*-identifier-1-*------------------------------->
*-literal-1----*
->---*-----------------------------*-------------------------><-
**------*-*-mnemonic-name----**
*-UPON-* *-environment-name-*
If identifier-1 is numeric and is not described as an external
decimal, the identifier is converted automatically to external format as
follows:
- Binary or internal decimal 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 or binary data (COMP, COMP-3, PACKED-DECIMAL,
BINARY, or COMP-4) should not be displayed on a display station. Such
data can contain display station control characters which can cause
undesirable and unpredictable results.
- No other identifiers require conversion.
Literal-1 may be any figurative constant. When you
specify a figurative constant, only a single occurrence of that figurative
constant is displayed.
Each numeric literal must be an unsigned integer. Signed noninteger
numeric literals are allowed.
The UPON phrase specifies the output device to be used for the DISPLAY
statement. The logical record length depends on the device:
- The job log = 120 characters
- The workstation = 58 characters
- The system operator's message queue = 58 characters
When you omit the UPON phrase, the DISPLAY statement sends output to the
REQUESTOR (workstation).
Mnemonic-name must be associated in the SPECIAL-NAMES paragraph
with an input/output device: a workstation (REQUESTOR), or a system
operator's message queue (CONSOLE or SYSTEM-CONSOLE).
Environment-name may be specified in place of
mnemonic-name. Valid environment-names are CONSOLE and
SYSOUT.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.