Paging through the OS/400 Program (SFLPAG Does Not Equal SFLSIZ) for Display Files

The OS/400 program 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 scroll shaft that best represents where the user is in the subfile. When the last page of the subfile is displayed, the OS/400 program displays the plus sign, 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, displays the Bottom text, or displays 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 OS/400 program 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 OS/400 program 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 scrollbar, then control is passed back to the program when a PAGEDOWN key is press or a manipulation of the graphical scrollbar would display a partial page.