SFLPAG (Subfile Page) keyword for display files

You use this record-level keyword on the subfile-control record format to specify the number of records in the subfile to be displayed at the same time.

For an exception to this rule, see Field selection.

The format of the keyword is:
SFLPAG(number-of-records-to-be-displayed)

The SFLPAG parameter value and the number of lines required by each subfile record determine the number of actual lines required to display the page of records. Not all records within a subfile must be displayed at the same time, and not all lines of the display are required to display a page of subfile records.

This keyword is required for the subfile-control record format.

Subfile page equals subfile size

When you specify the same parameter values for SFLPAG and SFLSIZ, the maximum number of records that can be contained in the subfile equals the maximum number of subfile records that can appear on the display at one time. For this condition, the IBM® i program does not automatically page through the subfile when the Page Up or the Page Down key is pressed. If the ROLLUP and ROLLDOWN keywords are specified and one of the Page keys is pressed, the IBM i operating system returns control to your program instead. If ROLLUP and ROLLDOWN are not specified, a message is sent to the workstation user, indicating that a key is not supported on the display.

If subfile size equals subfile page, the following keywords are not allowed:

SFLDROP
SFLFOLD
SFLROLVAL

When several display sizes are used (DSPSIZ keyword specified), these keywords are ignored only for display sizes for which subfile size equals subfile page.

Field selection

When subfile page equals subfile size, you can specify option indicators for fields in the subfile record format. This is called field selection. When field selection is used in the subfile record, SFLPAG(value) specifies the number of display lines available to display the records of this subfile. (Without field selection, SFLPAG(value) specifies the number of subfile records that can be displayed at one time.) This specification must be considered when a subfile record occupies more than one display line. The value of SFLPAG must be greater than or equal to the number of display lines occupied by the subfile.

If the subfile record format contains field selection, the following keywords are not valid on the subfile-control record format:

SFLDROP
SFLFOLD
SFLINZ
SFLLIN
SFLRCDNBR
SFLRNA (because SFLINZ is not valid)
SFLROLVAL

Subfile page does not equal subfile size

When you specify different parameter values for SFLPAG and SFLSIZ, the IBM i operating system recognizes the Page Up and Page Down keys and automatically pages through the subfile according to the value specified in the field for which the SFLROLVAL keyword is specified. If you do not specify the SFLROLVAL keyword, the IBM i program pages through the subfile by the parameter value specified for the SFLPAG keyword except for subfiles using SFLDROP. If you use the SFLDROP keyword, more records are displayed than the SFLPAG value when records are displayed in the truncated format. For truncated records, the IBM i operating system pages through the display by the number of records displayed in the truncated format.

Option indicators are not valid for this keyword. Display size condition names are valid. Display size condition names are required if you want the number of records that can be displayed at one time to change, based on the size of the display.

Example

The following example shows how to specify the SFLPAG keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SFLR                      SFL
     A*
     A*           (at least one displayable field)
     A*
00040A          R SFLCTLR                   SFLCTL(SFLR)
00050A                                      SFLPAG(17)
00060A                                      SFLSIZ(17)
00070A                                      SFLDSP SFLDSPCTL
     A

Because the value specified for the SFLPAG keyword equals the value specified for SFLSIZ(17), subfile page equals subfile size.