Display size condition names

If you want your program to open this file to display devices with display sizes other than 24 lines x 80 characters, specify the DSPSIZ (Display Size) keyword at the file level.

You can then condition the use of keywords and the location of fields with the display size condition names specified for the DSPSIZ keyword. If you do not specify the DSPSIZ keyword, your program can only open this file to display devices with a 24 x 80 display.

The following table shows the display size condition name for each display device.

Device Display size Display size condition name (see Note)

3179
3180
3196
3197 (Models C1 and C2)
3476
3487 (Models HA, HC, HG, and HW)
3488 (depending on the monitor that is attached to the display device)
3486 (Models BA and BG)
5251 (Models 11 and 12)
5291
5292

24 x 80 characters (1920 characters) *DS3

3180
3197 (Models D1, D2, W1, and W2)
3477 (Models FA, FC, FD, and FG)
3487 (Models HA, HC, HG, and HW)

27 x 132 characters (3564 characters) *DS4
Note: You can specify a user-defined display size condition name instead of *DS3 or *DS4. See the DSPSIZ (Display Size) keyword for display files topic for an explanation of how to specify user-defined condition names.

Figure 1 shows how to specify the DSPSIZ keyword and display size condition names.

Figure 1. Specify the DSPSIZ keyword and display size condition names
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A                                             1    2
00010A                                      DSPSIZ(27 132 *LARGE 24 80 *NORMAL)
00020A          R RECORDA
00030A            FIELDA        10  0   1  2
00040A            FIELDB        10  0   1120
00050A  *NORMAL                         1 49
00060A            FIELDC        10  0  27  1
00070A  *NORMAL                        15  1
     A

In Figure 1, the display size condition name for the primary display size is defined as *LARGE 1 (column 52 to 64) and the display size condition name for the secondary display size is defined as *NORMAL 2 (column 66 to 75). FIELDA appears on line 1, position 2 for both display sizes. FIELDB appears on line 1, position 120 for the primary display size (*LARGE by default), and on line 1, position 49 for the secondary display size (*NORMAL specified in positions 9 through 16). FIELDC appears on line 27, position 1 for the primary display size and on line 15, position 1 for the secondary display size. Only secondary display sizes (in this example, *NORMAL) can be used to condition field locations.

Use display size condition names similar to the way you use option indicators, except that display size condition names do not appear in your program and do not appear in the output record. A display size condition is on if the display file is opened to the corresponding display size. When you use display size condition names, the following rules apply:
  • Specify the DSPSIZ keyword to designate the primary display size and the secondary display size. If you do not specify the DSPSIZ keyword, the default is DSPSIZ(*DS3).
  • You can specify only one display size condition name for a condition. You cannot specify AND or OR with other display size condition names or option indicators.
  • The display size condition name must start in position 9.
  • The display size condition name can be user-defined. See the keyword description for DSPSIZ (Display Size) keyword for display files for more details.
  • You can specify N in position 8 to designate a NOT condition (for the primary display size).
    Note: Specifying N in position 8 implies an OR relationship between the remaining display size condition names. For example, N*DS4 implies *DS3 when *DS3 is specified as a secondary display size on the DSPSIZ keyword.
  • You must not use display size condition names that alter the line or position sequence of a field within a record. Fields are ordered in the display file by primary locations. A severe error occurs at file creation time if the secondary location alters this primary sequence.

    For example, FLD1 and FLD2 are on the primary display. FLD1 is located on line 2, position 2 and FLD2 on line 4, position 2. You cannot use a display size condition name to display FLD2 before FLD1 on the display (on line 1) for a secondary display size.

  • When you specify the location of a field on a secondary display size, you can only specify positions 8 through 16 (conditioning) and 39 through 44 (location).
  • If you do not specify a condition name for a keyword for which condition names are valid, the primary condition name specified on the DSPSIZ keyword is the default.

Table 1 shows the correct and incorrect combinations of display size condition names and primary display sizes, when both display sizes are specified on the DSPSIZ keyword and the first one specified varies.

Table 1. Valid display size condition specifications
Display size condition name1 24 x 80 DSPSIZ(*DS3...) or DSPSIZ(24 80...) primary display size 27 x 132 DSPSIZ(*DS4...) or DSPSIZ(27 132...) primary display size
*DS3 Error2 Valid
*DS4 Valid Error2
N*DS3 Valid Error3
N*DS4 Error3 Valid
Notes:
  1. See the DSPSIZ keyword description for user-defined names for these display size condition names.
  2. The display size condition names are in error because that display size is the primary display size.
  3. These display size condition names are in error because a primary and a secondary location are implied for the same display size. A condition name specified with the NOT condition implies an OR relationship. For example, N*DS4 implies *DS3.

Figure 2 and Figure 3 show display size conditioning for a keyword (in this case, MSGLOC, Message Location).

Figure 2. Display size conditioning (example 1)
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00030A                                      DSPSIZ(*DS3 *DS4)
00040A  *DS4                                MSGLOC(26)
     A

In Figure 2, the display size condition name *DS4 is specified, so that the message line is line 26 for a 27 x 132 display and line 25 (the default) for a 24 x 80 display.

Figure 3. Display size conditioning (example 2)
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00080A                                      DSPSIZ(*DS4 *DS3)
00081A                                      MSGLOC(26)
     A

In Figure 3, the message line is also line 26 for the 27 x 132 display and line 25 (the default) for the 24 x 80 display, even though no display size condition name is specified, because the primary display size (*DS4) specified with the DSPSIZ keyword is the default.