IBM Extension
IBM Extension

Format 3 – Extended DISPLAY Statement

A DISPLAY statement is considered an extended DISPLAY statement if it has one of the following:
  • An AT phrase
  • An UPON CRT or UPON CRT-UNDER phrase
  • A MODE IS BLOCK phrase
  • A WITH phrase
  • No UPON phrase and a CONSOLE IS CRT specified in the SPECIAL-NAMES paragraph.
A DISPLAY statement is considered a standard DISPLAY statement if it has one of the following:
  • An UPON phrase (other than UPON CRT or UPON CRT-UNDER)
  • No UPON phrase and no CONSOLE IS CRT specified in the SPECIAL-NAMES paragraph.
Read syntax diagramSkip visual syntax diagram
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:
  1. Syntax-checked only.

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.

End of IBM Extension
End of IBM Extension