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 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.
The following are descriptions of special cases you might encounter when specifying DSPSIZ:
For implementation and programming purposes, these records are assumed to be located at 00 (from line 0 to line 0). On an output operation, any record located at 00 overlays a record at that location. When an overlap occurs, the previous record is disregarded and no longer considered active. The new record at location 00 is active and can be read by your program.
If a field does overlap, it is treated as an optioned field and not selected. To allow this processing-time checking, data description specifications must ensure all fields within a record are in primary location sequence, even when condition names are specified. For example, assume only one input field is specified for a record format and, according to the field location specification, this field overlaps a preceding output field. The work station user cannot enter any data because the input field is never displayed.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.