BLANKS (Blanks) Keyword for Display Files --Examples

In Figure 98, when an output/input field contains all blanks (hex 40) or all nulls (hex 00) when displayed, and certain keywords affecting the display of the field are also specified, the response indicator is not set on.

Figure 98. Specifying the BLANKS Keyword (I/O Fields with Nulls and Blanks)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A* When OVRATR is specified
00020A          R REC1                      PUTOVR
00030A            FLD1          10  0B  2  2BLANKS(50) OVRATR
00040A  78                                  DSPATR(HI)
00050A* When PUTRETAIN is specified
00060A          R REC2                      PUTRETAIN OVERLAY
00070A            FLD2          10  0B  2  2BLANKS(50)
00080A          R REC3                      OVERLAY
00090A            FLD3          10  0B  2  2BLANKS(50)
     A                                      PUTRETAIN
     A

For all record formats in this example, response indicator 50 is set on as expected the first time the field is read by the program (if the field appears blank on the display). However, after a subsequent display, response indicator 50 is set on again only if the display station user again blanks the field. If the work station user does not again blank the field, response indicator 50 is off.

Figure 98 and Figure 100 concern cases when the field is first displayed, then deleted.

In Figure 99, when an input-capable field is overlapped by another field, causing the first field to be deleted, the response indicator is not set on (even though the field in the input buffer still contains all blanks or all nulls).

Figure 99. Specifying the BLANKS Keyword (Field Erased by Overlap)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R REC4                      OVERLAY
00020A  15        FLDA          10  0B  2  2
00030A            FLD4          10  0B  2  5BLANKS(50)
     A

In Figure 99, if option indicator 15 is off when REC4 is first displayed, FLD4 is displayed and FLDA is not. When REC4 is read, response indicator 50 is set on if FLD4 is blank. If option indicator 15 is then set on when REC4 is displayed again, FLDA overlaps FLD4 and deletes it. Response indicator 50 is then off when REC4 is read. (This occurs because the OS/400 program turns it off when displaying the record format and does not turn it back on for a field that is not on the display, even if the field contains blanks or nulls from a previous I/O operation.)

In Figure 100, after initial display, an output/input field is not displayed again on a subsequent output/input operation (even though the field in the input buffer still contains all blanks or all nulls).

Figure 100. Specifying the BLANKS Keyword (No Redisplay)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R REC5                      ERASEINP OVERLAY
00020A  20        FLD5          10  0B  2  2BLANKS(50)
00030A*
00040A          R REC6                      ERASEINP  OVERLAY  MDTOFF
00050A  20        FLD6          10  0B  2  2BLANKS(50)  DSPATR(MDT)
     A

In Figure 100, if option indicator 20 is on when REC5 or REC6 is first displayed, FLD5 or FLD6 is displayed. When REC5 or REC6 is read, response indicator 50 is set on if FLD5 or FLD6 is blank. However, if option indicator 20 is set off on a second display, FLD5 or FLD6 is not displayed.