Previous Topic Next topic Print topic


Displaying Group Items

Consider the following group item:

 01 display-item.
     03 display-item-1        pic x(20).
     03 filler                pic x(35).
     03 display-item-2        pic 9(10).
     03 filler                pic x(105).
     03 display-item-3        pic z(4)9.
If the following statement is executed on a screen 80 characters wide:
display display-item at 0101
display-item-1 is displayed at row 1, column 1, display-item-2 is displayed at row 1, column 56, display-item-3 is displayed at row 3, column 11

All other areas of the screen are unaffected by this DISPLAY statement. FILLER items do not cause any data to be displayed on the screen. Consequently, data already on the screen in the positions defined by each FILLER is not altered in any way by this DISPLAY statement.

If a data item is defined as follows:

 01 data-item.
    03 data-char                       pic x occurs 2000.

and the following statement is executed:

display data-item at 0101

then this is treated as a display of 2000 fields, each defined as PIC X, which is unlikely to be what you require. To avoid this, either redefine data-item as a PIC X(2000) and display that, or use the MODE IS BLOCK clause described in the section MODE IS BLOCK Clause.

Previous Topic Next topic Print topic