SFLEND (Subfile End) keyword for display files

Use this record-level keyword on the subfile control record format to permit the display of a plus sign (+) or text (More… or Bottom) in the lower-right display location occupied by the subfile or a scroll bar.

The plus sign or More… text indicates that the workstation user can move the text lines on the subfile to display more records by pressing the Page Up key.

The format of the keyword is:
SFLEND[(*PLUS | *MORE | {*SCRBAR [*SCRBAR | *PLUS |*MORE ]})]
The scroll bar indicates different types of information about the subfile:
  • Where the user is at in the subfile
  • How big the subfile is
  • What proportion of the subfile the user is viewing

The parameter values *PLUS, *SCRBAR, and *MORE are optional. If no parameter is specified, *PLUS is used. The second set of *PLUS, *MORE, and *SCRBAR can only be specified if *SCRBAR is specified as the first parameter. *SCRBAR is the default for the second parameter.

*PLUS tells the system to use the plus sign to indicate that you can use the Page Down key to see more records.

*MORE tells the system to use the More… text to indicate that you can use the Page Down key to see more records. *MORE also tells the system to use the Bottom text to indicate that the last subfile record is displayed.

When *MORE is specified, the subfile takes up one more line on the screen (SFLPAG + 1). This line is needed for the text, More… and Bottom. If there is not room for the extra line on the display or in a window, a message is issued at file creation time and the file is not created.

*SCRBAR tells the system to use a graphical scroll bar for a graphical display. When *SCRBAR is specified, the last 3 columns of the lines that the subfile is using is reserved for the scroll bar. When *SCRBAR is used, a second parameter can be specified. The second parameter tells the system what scrolling indicator should be used for nongraphical displays. *SCRBAR is the default for those displays. *MORE and *PLUS can be used for the second parameter. When *SCRBAR is used the subfile must occupy at least 3 lines. SFLFOLD or SFLDROP will work with scroll bars. Both versions of the subfile (folded or truncated) must occupy three lines.

If the device configuration that is being used supports a pointer device, the scroll bar can also navigate through the subfile. For more information about how to support different device configurations and how scroll bars are controlled using the PAGEUP, PAGEDOWN, and SFLSIZ keywords, see the Application Display Programming bookLink to PDF.

An option indicator must be specified for this keyword.

Page through your program (SFLPAG equals SFLSIZ)

Your program controls the display of the plus sign or the More… or Bottom text through the use of the indicators on SFLEND. Set the indicators off to display the plus sign or the More text. Set the indicators on to remove the plus sign from the display or to display the Bottom text. When the Page Up key is pressed, your program handles the processing. For instance, it reads the subfile, clears it, rewrites the subfile with new records, and displays it again. If your program does this, the display shows the plus sign or the More text. If not, the plus sign disappears from the display or the Bottom text appears.

Note: *SCRBAR can be used when SFLPAG equals SFLSIZ. The scroll bar will be displayed with buttons, a shaft, and a scroll box which covers the entire shaft.

Page through i5/OS™ (SFLPAG does not equal SFLSIZ)

The i5/OS operating system displays the plus sign as long as there are more records in the subfile to be displayed, no matter how the option indicator is set. The scroll bar will display with the scroll box placed on the placed at a position on the scroll bar that best represents where the user is in the subfile. When the last page of the subfile is displayed, the i5/OS operating system displays the plus sign, the More... text, or the scroll bar with the scroll box one page size above the scroll button if the indicator is off. It does not display the plus sign, the Bottom text, or the scroll bar with the scroll box on top of the bottom scroll button if the indicator is on.

Your program must set the indicator on or off when displaying the subfile. (Your program cannot find out, when the i5/OS operating system is paging through the subfile, which page of the subfile is displayed.)

If your program sets off the indicator for SFLEND when displaying the subfile, either the plus sign, the More text, or the scroll bar with the scroll box one page size above, the scroll button is displayed with the last page of the subfile. Because the plus sign is displayed but the i5/OS operating system cannot page the subfile any further, your program must provide for any further paging. Specify the PAGEDOWN keyword on the subfile control record format so that control is passed to your program when the Page Down key is pressed again. When your program receives control, it can add more records to the end of the subfile and use the SFLRCDNBR keyword to display a new page.

Note: If the PAGEDOWN keyword is specified with a scroll bar, then control is passed back to the program when a PAGEDOWN key is pressed or a manipulation of the graphical scroll bar will display a partial page.

Position of plus sign with *PLUS option

For the 24 x 80 display size, positions 78 through 80 of the last line occupied by the subfile are used for the beginning attribute character, plus sign, and ending attribute character. For the 27 x 132 display size, positions 130 through 132 of the last line occupied by the subfile are used for the beginning attribute character, plus sign, and ending attribute character.

Note: If an input field occupies the location of the plus sign and the field is changed, the plus sign and its attribute characters are returned to the program as data in the field. For selection lists, the plus will be positioned to the right of the choices for the list.

Position of More... and Bottom text with *MORE option

For the 24 x 80 display size, positions 67 through 80 of the line immediately following the last line occupied by the subfile are used for the beginning attribute character, right justified More… or Bottom text, and ending attribute character. For the 27 x 132 display size, positions 119 through 132 of the line immediately following the last line occupied by the subfile are used for the beginning attribute character, right aligned More… or Bottom text, and ending attribute character. For selection lists, the more and bottom text will be positioned to the right of the choices for the list.

Position of the scroll bar with *SCRBAR option

For the 24 x 80 display size, positions 77 through 80 of every line of the subfile will be reserved for the scroll bar. No fields of the subfile can use those columns. Thus no fields can occupy more than one line of the subfile. Multiple line subfiles can be used. For the 27 x 132 display size, positions 129 through 132 of every line of the subfile will be reserved for the scroll bar. For selection lists, the scroll bar will be positioned to the right of the choices for the list. For other subfiles, the scroll bar will be positioned on column 79.

Example 1

The following example shows how to specify the SFLEND keyword without parameters.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SETSFL1                   SFL
00020A  50                                  SFLNXTCHG
00030A            SETSEL         1Y 0B  6  2VALUES(1 2 9) CHECK(AB)
00040A            SETNAME       10A  O  6  4
00050A          R SETCTL1                   SFLCTL(SETSFL1)
00060A                                      SFLSIZ(34)
00070A                                      SFLPAG(17)
00080A  40                                  SFLDSP
00090A  41                                  SFLDSPCTL
00100A  42                                  SFLDLT
00110A  43                                  SFLCLR
00120A  49                                  SFLEND
00130A N49                                  ROLLUP(26)
00140A            SETRRN         4S 0H      SFLRCDNBR(CURSOR)
     A

Paging is provided by the i5/OS operating system and the plus sign (+) appears in the lower right corner of the display. When the last record is written to the subfile, indicator 49 is set on, which disables the Page Down key and omits the plus sign from the display.

Example 2

The following example shows how to specify the SFLEND keyword with *MORE as a parameter.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SETSFL2                   SFL
00020A  50                                  SFLNXTCHG
00030A            SETSEL         1Y 0B  6  2VALUES(1 2 9) CHECK(AB)
00040A            SETNAM        10A  O  6  4
00050A          R SETCTL2                   SFLCTL(SETSFL2)
00060A                                      SFLSIZ(34)
00070A                                      SFLPAG(17)
00080A  40                                  SFLDSP
00090A  41                                  SFLDSPCTL
00100A  42                                  SFLDLT
00110A  43                                  SFLCLR
00120A  49                                  SFLEND(*MORE)
00130A N49                                  ROLLUP(26)
00140A            SETRRN         4S 0H      SFLRCDNBR(CURSOR)
     A

Paging is provided by the i5/OS operating system. The More… text appears at the lower right corner of the display on the line immediately following the subfile if there are more records to see in the subfile. When the last record is written to the subfile, indicator 49 is set on, which disables the Page Down key and causes the Bottom text to appear instead of More….

Example 3

The following example shows how to specify the SFLEND keyword with *SCRBAR as a parameter.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SETSFL2                   SFL
00020A  50                                  SFLNXTCHG
00030A            SETSEL         1Y 0B  6  2VALUES(1 2 9) CHECK(AB)
00040A            SETNAM        10A  O  6  4
00050A          R SETCTL2                   SFLCTL(SETSFL2)
00060A                                      SFLSIZ(34)
00070A                                      SFLPAG(17)
00080A  40                                  SFLDSP
00090A  41                                  SFLDSPCTL
00100A  42                                  SFLDLT
00110A  43                                  SFLCLR
00120A  49                                  SFLEND(*SCRBAR *MORE)
00130A N49                                  ROLLUP(26)
00140A            SETRRN         4S 0H      SFLRCDNBR(CURSOR)
     A

Paging is provided by the i5/OS operating system. The scroll bar will be displayed for graphical displays. If a graphical display is not used, then the More…. text appears at the lower right corner of the display on the line immediately following the subfile if there are more records to see in the subfile. When the last record is written to the subfile, indicator 49 is set on, which disables the Page Down key and causes the Bottom text to appear instead of the More…. text. The scroll bar will be displayed with the scroll box just above the bottom scroll button.

Related reference
SFLROLVAL (Subfile Roll Value) keyword for display files