DSPSIZ (Display Size) Keyword for Display Files--Examples

Figure 149, and Figure 151 through Figure 153 show how to specify the DSPSIZ keyword and the display size condition names.

Figure 149 shows how to specify primary and secondary display sizes using the DSPSIZ keyword.

Figure 149. Specifying the DSPSIZ Keyword (Example 1)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A*
00020A*                                           (1)(2)
00030A                                      DSPSIZ(27 132 24 80)
00040A          R RECORDA
00050A            FIELDA        10  0   1  2
00060A            FIELDB        10  0   1 81
00070A            FIELDC        10  0  25  1
     A

In Figure 149, the primary display size (1) is 27 x 132 and the secondary display size (2) is 24 x 80. FIELDB is beyond position 80 and FIELDC is beyond line 24, so the data description processor gives them a location of *NOLOC in the expanded source printout for secondary display size 24 x 80.

If the data description processor assigns *NOLOC to an input-capable field, that field is processed at run time to the point of setting up the input buffer data to be returned in the user's input buffer. The field itself is not displayed. The work station user cannot enter into or change these fields. No processing of any kind is done for output-only fields.

Figure 150 shows a compiler listing for Figure 149.

Figure 150. Compiler Listing

Compiler Listing

Figure 151 is another example of specifying the primary and secondary display sizes using the DSPSIZ keyword.

Figure 151. Specifying the DSPSIZ Keyword (Example 2)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      DSPSIZ(27 132 *WIDE 24 80 *NORMAL)
00020A          R RECORDA
00030A            FIELDA        10  0   1  2
00040A            FIELDB        10  0   1 81
00050A  *NORMAL                         1 50
00060A            FIELDC        10  0  25  1
00070A  *NORMAL                        23  1
     A

Figure 151 is similar to the example in Figure 149 specified for FIELDB (line 1, position 50) and for FIELDC (line 23, position 1) on the secondary display size (user-defined as *NORMAL).

Figure 152 shows how to reposition a field when the file is opened to different display sizes.

Figure 152. Specifying the DSPSIZ Keyword (Example 3)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      DSPSIZ(24 80 27 132)
00020A          R RECORDA
00030A            FIELD1        10  0  23  2
00040A
00050A
00060A  *DS4                           26  2
     A

In Figure 152, FIELD1 has valid locations on both display sizes. It appears on the next to the last line on each display size.

Figure 153 shows that if you do not specify a display size condition name, the display location of a field can still be display size dependent as the result of the plus feature of DDS.

Figure 153. Specifying the DSPSIZ Keyword (Example 4)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      DSPSIZ(*DS4 *DS3)
00020A          R RECORD1
00030A            FIELD1        21      2 70
00040A            FIELD2        10       +10
     A

In Figure 153, a line and a position for each field is calculated for each display size specified on the DSPSIZ keyword. If the plus value extends the field location beyond position 80, the field location is dependent on the display size. Figure 154 is a compiler listing for Figure 153.

Figure 154. Compiler List

Compiler List

Special Cases for Display Files

The following are descriptions of special cases you might encounter when specifying DSPSIZ:

Note:
The primary location sequence as it is seen in the display file must not be changed by specifying a different location sequence for the secondary display size. (A severe error occurs and the file is not created.)