Using the scrolling commands

You can use the scrolling commands if the dialog function invokes the DISPLAY service for panels with scrollable areas or scrollable dynamic areas, the table display service (TBDISPL), or the interfaces to the PDF component VIEW, BROWSE, and EDIT services. During processing of the tutorial, ISPF interprets these commands as follows:
UP (F7/19)
Same as the UP command
DOWN (F8/20)
Same as the SKIP command
LEFT (F10/22)
Same as the BACK command
RIGHT (F11/23)
Same as the Enter key (display the next page).

When scrollable data is displayed, scrolling enables you to move the screen window up, down, left, or right across the information. When the cursor is within a scrollable field, scrolling enables you to move left or right within the variable data. Only up and down scrolling is allowed for table displays and scrollable areas.

When scrolling is allowed, a scroll amount is commonly displayed at the top of the screen (line 2). This amount determines the number of lines, or columns, scrolled with each use of a scroll command. To change the scroll amount, move the cursor to the scroll field and type over the displayed amount. Valid scroll amounts are:
ZXSMIN-ZXSMAX
A value between ZXSMIN and ZXSMAX where ZXSMIN and ZXSMAX are system profile variables containing the minimum and maximum scroll values as defined in the configuration table. Can be in the range of 0 to 9999999. When the value is entered in the scroll field the user is limited to entering a 4-digit value but when the value is entered in the command field it can be any value between ZXSMIN and ZXSMAX (inclusive).
Note: If you specify a scroll amount of 0, no scrolling occurs.
PAGE
Specifies scrolling by one page.

For scrolling purposes, a page is defined as the amount of information currently visible on the logical screen. Function key definition lines are not a part of the page. In split-screen mode, for example, a Browse display might have 12 lines by 80 columns of scrollable data. In this case, a scroll amount of PAGE moves the text up or down by 12 lines, or right or left by 80 columns. If the cursor is within a scrollable field, PAGE will move the text right or left the equivalent of the display field length.

DATA
For up and down scrolling, specifies scrolling by one line less than a page. For left and right scrolling, it is one column less than a page. Within a scrollable field, it is one column less than the display field length.
HALF
Specifies scrolling by half a page. Within a scrollable field, it is half the display field length.
MAX
Specifies scrolling to the top, bottom, left margin, right margin, beginning of field or end of field, depending upon which scrolling command is used and the current cursor position. For scrollable fields, the maximum right position is the field length minus the display length and the maximum left position is 1.
CSR
Specifies scrolling based on the current position of the cursor. The line or column indicated by the cursor is moved to the top, bottom, left margin, or right margin of the screen, depending upon which scrolling command is used. If the cursor is not in the body of the data or if it is already positioned at the top, bottom, left margin, or right margin, a full-page scroll occurs.
Note: Scroll amount is not used for scrollable areas.

The current scroll amount is saved in the application profile. There are three scroll amount values: one for Browse (ZSCBR), one for Edit and View (ZSCED), and one for member lists (ZSCML). When you type over the scroll amount, the new value remains in effect until you change it again. The value MAX is an exception. Following a MAX scroll, the scroll amount reverts to its previous value.

The scroll amount field is optional. If the input field following the command field in the panel body is exactly four characters long, it is assumed to be the scroll amount field. If there Otherwise, the system variable ZSCROLLD, which can be set by the dialog, is used to determine the default scroll amount. is no scroll amount field and ZSCROLLD has not been set, the default is PAGE.

When you enter a scroll request, variables ZSCROLLA, ZSCROLLN, and ZSCOLNL are set. ZSCROLLA contains the value of the scroll amount field (MAX or CSR, for example). ZSCROLLN and ZSCROLNL contain the number of lines or columns to scroll, computed from the value in the scroll amount field or entered as a scroll number. For example, if a dialog is in split-screen mode and if 12 lines are currently visible and a user requests DOWN HALF, ZSCROLLN and ZSCROLNL each contain a value of '6'. ZSCROLLN can support values up to '9999'. If a scroll number greater than '9999' is specified, ZSCROLLN is set to a value of '9999'. ZSCROLNL can support values up to '9999999'. The system variable ZVERB contains the scroll direction, DOWN in this case. If ZSCROLLA has a value of MAX, the values of ZSCROLLN and ZSCROLNL are not meaningful.

You can also use any valid scroll amount as part of the scroll command. For example, type:
Command ===> UP 3
and press Enter, or type:
Command ===> 3
and press the UP function key. Either form results in a temporary, one-time override of the scroll amount.

If ISPF does not recognize the value specified on the command line as a valid scroll amount, such as PAGE, DATA, HALF, MAX, CSR, or a positive integer, the value is interpreted as a command and passed to the function in control.