+-------------------------------IBM Extension--------------------------------+
A DISPLAY statement is considered an extended DISPLAY statement if it has one of the following:
A DISPLAY statement is considered a standard DISPLAY statement if it has one of the following:
DISPLAY Statement - Format 3 - Workstation I/O
.----------------------------.
V |
>>-DISPLAY----+-+-identifier-1-+-------+-+--+-------------+----><
| '-literal-1----' | '-END-DISPLAY-'
+-| line-column-phrase |-+
+-UPON-+-CRT-------+-----+
| '-CRT-UNDER-' |
+-MODE-+----+-BLOCK------+
| '-IS-' |
'-| with-phrase |--------'
line-column-phrase:
.----------------------------------------.
V |
|--+-+----+---+-LINE---+-+--------+-+-identifier-2-+-+-+--------|
| '-AT-' +-COLUMN-+ '-NUMBER-' '-integer-1----' |
| '-COL----' |
'-AT-+-identifier-3-+-------------------------------'
'-integer-2----'
with-phrase:
.-------------------------------------------------.
V |
|--WITH----+-+-BELL-+------------------------------------+-+----|
| '-BEEP-' |
+-BLINK---------------------------------------+
+-HIGHLIGHT-----------------------------------+
+-REVERSE-VIDEO-------------------------------+
+-UNDERLINE-----------------------------------+
+-BLANK-+-SCREEN-+----------------------------+
| '-LINE---' |
+-SIZE-+----+-+-identifier-4-+----------------+
| '-IS-' '-integer-3----' |
| (1) |
+-+-FOREGROUND-COLOR-------+-+----+-integer-4-+
| | (1) | '-IS-' |
| '-FOREGROUND-COLOUR------' |
| (1) |
'-+-BACKGROUND-COLOR-------+-+----+-integer-5-'
| (1) | '-IS-'
'-BACKGROUND-COLOUR------'
Notes:
Part of this statement can be repeated to allow the display of several data items. If the first identifier has no AT, LINE, or COLUMN phrase, it begins in line 1, column 2. Each subsequent data item begins at the currently available screen position following the previous data item.
If identifier-1 or literal-1 is not specified, neither the MODE IS BLOCK phrase nor the WITH phrase is allowed.
Identifier-1 cannot be a date-time item.
When identifier-1 does not fit within the screen, then alphanumeric data is truncated and numeric data is not put on the screen.
If identifier-1 is a group item and there is no MODE IS BLOCK phrase, those elementary subordinate items that have names other than FILLER are displayed. They are displayed simultaneously, and positioned on the screen in the order that their descriptions appear in the DATA DIVISION, separated by the lengths of the FILLER items in the group. For this purpose, the first position on a line is regarded as immediately following the last position on the previous line. When items are separated by FILLERs, the attribute bytes are included in the FILLER length. Thus a FILLER of one or two bytes would contain both the trailing and leading attributes of separate items. In the case of a one-byte FILLER, the trailing and leading attributes would occupy the same byte. Since data items are normally separated by one attribute byte, one-byte FILLERs are not necessary.
If no identifier or literal is present, the DISPLAY operation changes the screen position without actually displaying any data.
The phrases following the identifier or literal can be in any order. All phrases specified apply to the previous identifier or literal, if one was specified. The WITH and MODE phrases cannot be specified if an identifier or literal was not previously specified.
Identifiers or literals in a DISPLAY statement follow one after another, separated by one attribute byte, unless an AT, LINE, or COLUMN phrase is specified. If no AT, LINE, or COLUMN phrase appears in the statement, the first identifier or literal begins at line 1, column 2, followed immediately by all other identifiers or literals.
Related Information:
The AT phrase indicates the absolute address on the screen at which the DISPLAY operation is to start. It does not indicate the starting position of the leading attribute.
Related Information:
The LINE phrase specifies the line at which the screen item starts on the screen.
The COLUMN phrase specifies the column at which the screen item starts on the screen.
COL is an abbreviation for COLUMN.
The LINE and COLUMN phrases can appear in any order.
Identifier-2 cannot be a floating-point data item.
Certain combinations of line and column numbers have special meaning:
If identifier-3 or integer-2 is 4 digits long, the first two digits specify the line, and the second two digits specify the column. If identifier-3 or integer-2 is 6 digits long, the first three digits specify the line, and the second three digits specify the column.
Identifier-3 cannot be a floating-point data item.
Indicates that the DISPLAY statement is extended.
CRT-UNDER also underlines the displayed data item preceding the UPON CRT-UNDER phrase.
The identifier is treated as an elementary item. Even if it is a group item, it is displayed as one item.
The WITH phrase allows the user to specify certain options for the DISPLAY operation. These options are described in the following phrases.
An audible alarm sounds each time the item containing this phrase is displayed.
BELL and BEEP can be used interchangeably.
BLANK is effective each time the screen item containing this clause is displayed.
BLANK LINE erases from the current cursor position to the end of the current line. BLANK SCREEN erases the entire screen and places the cursor at line 1, column 2.
The erasing is done before the item is displayed.
The screen item blinks when it appears on the screen.
The screen item is in high-intensity mode when it appears on the screen.
The screen item is displayed in reverse image.
Specifies the current size of the data item on the screen. You can use this phrase with elementary data items only.
If identifier-4 or integer-3 has a sign, the compiler uses the absolute value, and issues a warning message.
Identifier-4 cannot be a floating-point data item.
The SIZE phrase has no effect if the size you specify is zero. In this case, the length of the field is used to display the data item.
If you specify a size that is less than the size implied by the associated PICTURE clause, only the leftmost portion of the data item appears on the workstation display.
When the size specified for a numeric or a numeric-edited data item is less than that implied by the PICTURE clause, truncation of the rightmost positions occurs when the value is displayed, or predisplayed in the ACCEPT operation. The data item is then updated following the rules for the MOVE operation.
If you specify a SIZE literal whose value causes the field length to exceed the screen size, alphanumeric data will be truncated and numeric data will be ignored and not displayed.
For justified items, only the rightmost portion appears when you specify a size that is smaller than the length of the item.
If the size you specify is greater than the size implied by the PICTURE clause, the displayed version of the item is padded with spaces. The padding occurs on the right.
ALL figurative constants are displayed as many times as necessary to reach the length you specify. If the display wraps around to a new line, the new line starts at the beginning of the constant.
Related Information:
The following is an example of displaying a figurative constant where the size specified is greater than the figurative constant and wraps around to a new line:
DISPLAY ALL 'ABCD' AT 0270 WITH SIZE 15.
This constant will be displayed on the screen starting with line 2, column 70:
0000000001 677777777778
1234567890................901234567890
Line 1
Line 2 ABCDABCDABC
Line 3 ABCD
Notice the differences between the following examples:
Statement 1 DISPLAY 'WORKSTATION' AT 0275 WITH SIZE 10
Statement 2 DISPLAY ALL 'WORKSTATION' AT 0275 WITH SIZE 10
0000000001 677777777778
1234567890................901234567890
Statement 1 WORKST
ATIO
Statement 2 WORKST
WORK
The screen item is underlined when it appears on the screen.
A data item can contain a table whether or not MODE IS BLOCK has been specified. Fixed-length and variable-length tables are treated as group items (MODE IS BLOCK is not specified) that are repeated from the first occurrence to the last occurrence of the table.
Some extended DISPLAY statement considerations also apply to the extended ACCEPT statement. (See Extended ACCEPT and Extended DISPLAY Considerations for more information.)
The ILE COBOL extended DISPLAY statement is similar to the IBM COBOL/2 DISPLAY statement (Format 2). The exceptions are discussed in Appendix I, ACCEPT/DISPLAY and COBOL/2 Considerations.
+----------------------------End of IBM Extension----------------------------+
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.