ALTPAGEDWN/ALTPAGEUP (Alternative Page Down/Alternative Page Up) keyword for display files

You use these file-level keywords to assign command function (CF) keys as alternative Page Down/Page Up keys.

When either the Page keys or the CF keys are pressed, the page function is called. The alternative Page Down and Page Up keys function only on the displays defined in the file with the ALTPAGEDWN or ALTPAGEUP keyword. They do not function on system displays, such as message help.

The format for each of these keywords is:
ALTPAGEDWN[(CFnn)]
ALTPAGEUP[(CFnn)]

The valid values for the optional parameters are CF01 through CF24. If the parameter is not specified, CF08 is the default for ALTPAGEDWN and CF07 is the default for ALTPAGEUP.

The PAGEDOWN/PAGEUP keyword should also be specified if you want your program to handle any situation where the user has pressed a Page key or the alternative CFnn key and the IBM® i program cannot move the text lines on the display. If you do not specify the PAGEDOWN/PAGEUP keyword, a message indicating the key is not valid is displayed when either a Page key or the alternative CFnn key is pressed and the IBM i operating system cannot move the text lines on the display.

Note: Throughout this keyword description, PAGEDOWN means the PAGEDOWN or the ROLLUP keyword. PAGEUP means the PAGEUP or the ROLLDOWN keyword.

If you specify a response indicator on the PAGEDOWN or PAGEUP keyword, the response indicator is set on and returned to your program when either the Page key or the alternative CFnn key is pressed and the IBM i operating system cannot move the text lines on the display.

If you specify option indicators on the PAGEDOWN or PAGEUP keyword, the same option indicators apply to the ALTPAGEDWN or ALTPAGEUP keyword, in the order given. That is, when the indicator condition is true, control will be returned to your program when either the Page key or the CFnn key is pressed and the IBM i operating system cannot move the text lines on the display.

The following keywords cannot be specified in a file with an ALTPAGEDWN keyword that has no parameter (CF08 default):

The following keywords cannot be specified in a file with an ALTPAGEUP keyword that has no parameter (CF07 default):

Similarly, the following keywords cannot be specified in a file with ALTPAGEDWN(CFnn) or ALTPAGEUP(CFnn) (where nn is the same number):

Also, you cannot specify the same command function (CF) key on both the ALTPAGEDWN and the ALTPAGEUP keywords.

You cannot specify RETKEY or RETCMDKEY in a file with the ALTPAGEDWN or ALTPAGEUP keyword.

The ALTPAGEDWN and ALTPAGEUP keywords are allowed only in files containing a pageable area (either a subfile or a PAGEDOWN/PAGEUP keyword).

Option indicators are not valid for these keywords.

Example

The following example shows how to specify the ALTPAGEDWN and ALTPAGEUP keywords.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A                                      ALTPAGEUP
     A                                      ALTPAGEDWN
     A          R SUBFILE                   SFL
     A            FIELD1        20A    5   5
     A          R CONTROL                   SFLCTL(SUBFILE)
     A                                      SFLSIZ(30)
     A                                      SFLPAG(10)
     A                                      SFLDSP
     A

The CF07 and CF08 keys are alternative page keys. During display of the subfile, if the user presses the CF07/CF08 key or a Page key, the IBM i operating system pages the subfile. If the IBM i operating system cannot page the subfile without going beyond the end or beyond the beginning, a message is displayed indicating the key is not valid at that time (PAGEDOWN/PAGEUP not specified).