Example: A subfile with SFLPAG value equal to SFLSIZ value

The display is defined by the DDS in this example. It is displayed by an output operation to the subfile control-record format SFLCTL1.

         
         First Field     Second Field

                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX
                         XXXXXXXXXXXXXXXXXXXX

The following keywords are important in the example:

ROLLDOWN
ROLLUP
SFLCLR
SFLDSP

SFLDSPCTL
SFLPAG
SFLSIZ

The file in Figure 1 has one column of subfile records. Constant fields in the subfile control-record format are used as headings for columns of fields in the subfile records.

Figure 1. Subfile with subfile size equal to subfile page
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A* USE OF SUBFILE KEYWORDS
00020A   (1)    R SFL1                      SFL
00030A   (2)      FLD1          10  0I  3 11
00040A   (2)      FLD2          16   O  3 26
00050A
00060A   (1)    R SFLCTL1                   SFLCTL(SFL1)
00070A                                      SFLSIZ(18)     (3)
00080A                                      SFLPAG(18)     (3)
00090A  05                                  SFLDSP         (4)
00100A  05                                  SFLDSPCTL      (4)
00110A N05                                  SFLCLR         (5)
00120A                                      ROLLUP(01) ROLLDOWN(02)(6)
00130A                                  1 11'First Field'   (7)
00140A                                  1 26'Second Field'  (7)
     A
Legend:
(1)
The subfile record format SFL1 and the subfile control-record format SFLCTL1 together define one subfile. The parameter value for the SFLCTL keyword is the name of the subfile record format.
(2)
Each subfile record is made up of two fields: FLD1 and FLD2. FLD1 is 10 bytes long (11 bytes display length because it defaults to signed numeric); FLD2 is 16 bytes long. FLD1 is an input-only field; FLD2 is an output-only field. Eighteen subfile records appear on the display, with the first one on line 3 and the last one on line 20. For each subfile record on the display, two fields (FLD1 and FLD2) appear, with four spaces between FLD1 and FLD2.
(3)
SFLSIZ and SFLPAG (required keywords) have equal values (18). Therefore one page equals the whole subfile. For all subfiles, the value of the SFLPAG keyword is the number of subfile records displayed at any one time (unless the SFLDROP keyword or variable-length records are used).
(4)
SFLDSP (a required keyword) and SFLDSPCTL (an optional keyword) are specified with indicator 05. Therefore, when indicator 05 is set on, the subfile and subfile control records can be displayed by an output operation to the subfile control-record format SFLCTL1.
(5)
SFLCLR (an optional keyword) is specified with option indicator 05 preceded by an N. When indicator 05 is set off, the subfile can be cleared by an output operation to SFLCTL1.
(6)
ROLLUP (an optional keyword) is specified with response indicator 01, and ROLLDOWN (an optional keyword) is specified with response indicator 02. Note also that the entire subfile equals one page, which means that the whole subfile is displayed at one time. Therefore, when the display station user presses the Page Up key, control passes to the program with indicator 01 on, and when the workstation user presses the Page Down key, control passes to the program with indicator 02 on. The program must handle paging, by reading, clearing, rewriting, and redisplaying the subfile. Without ROLLUP and ROLLDOWN specified, the workstation user will receive an error message when pressing the Page Up or Page Down key.
(7)
Two constants ('First Field' and 'Second Field') are displayed when the subfile control-record is displayed (SFLDSPCTL in effect). As specified in this subfile, they act as column headings to the subfile records.