System variables are the ISPF-function interface
Eight system variables in the function pool are the vehicle for
passing, between ISPF and the function, values that control table
expansion. These variables and the functions they perform are:
- ZTDRET (input; length 8)
- The function sets variable ZTDRET in the function pool to a value (UP, DOWN, or VERTICAL) that indicates to ISPF when control is to return to the function so that more rows can be added to the table being processed.
- ZTDADD (output; length 3)
- ISPF sets this variable to either YES or NO before returning control to the function. A value of YES indicates that the function needs to add more rows to the table being processed. ZTDADD is normally set to NO, indicating that no more rows need to be added to the table.
- ZTDSCRP (input/output; length 6)
- This variable is set to the row pointer (number of the row relative to the top of the table) of the row that is to be at the top of the panel's scrollable area after the scroll request is processed. If ISPF cannot determine this value, this variable is set to zero.
- ZTDSRID (output; length 6)
- ISPF sets this variable to the row ID of the row pointed to by the value in variable ZTDSCRP. During table processing, the row pointer value for a given row can change. However, the row ID of that row does not change.
- ZTDAMT (output; length 4)
- When ISPF returns control to the function with the value of variable ZTDADD set to YES, the value that ISPF has set in variable ZTDAMT tells the function how many rows, based on the information available, ISPF calculates should be added to the table to satisfy the current scroll request. If the number of rows is calculated to be greater than 9999 then ZTDAMT is set to 9999. ZTDAMTL always holds the number of rows.
- ZTDAMTL (output; length 8)
- When ISPF returns control to the function with the value of variable ZTDADD set to YES, the value that ISPF has set in variable ZTDAMTL tells the function how many rows, based on the information available, ISPF calculates should be added to the table to satisfy the current scroll request. If the value is less than 10000, then ZTDAMT also holds the number of rows. ZTDAMTL always holds the correct number of rows.
- ZTDSIZE (output; length 4)
- ISPF sets the value of ZTDSIZE to the total number of model sets; that is, the number of table rows that fill the scrollable area of the panel. This is not necessarily the same as the number of lines displayed in the panel's scrollable area.
- ZTDLTOP (input; length 6)
- The function can optionally set this variable to a value for ISPF to use in calculating the value x (top-row-displayed) in the indicator 'ROW x OF y', which ISPF displays on a TBDISPL screen.
- ZTDLROWS (input; length 6)
- The function can optionally set this variable to a value for ISPF to use as the value y (total rows in the logical table) in the indicator 'ROW x OF y'.
You can define variables ZTDAMT, ZTDSCRP, ZTDSRID, ZTDSIZE, ZTDLTOP, and ZTDLROWS as fullword fixed binary in a program function. If you do not, the default for each of these variables is character with lengths as specified in the system variable charts in the System variables.