Use this field-level keyword in the subfile control record format to return the relative record number of the subfile record that is at the top of the subfile when control is given back to your program.
This keyword has no parameters.
This field must have the keyboard shift attribute of signed numeric with zero decimal positions. It has to be 5 digits in length, and it must be defined as a hidden field. The hidden field will not display an input field on the screen.
This field is returned to your program as part of the input for this subfile control record. If control is returned to your program by pressing the enter key, then the value returned will be the relative record number of the top subfile record currently displayed.
With the ROLLUP or ROLLDOWN keywords, control is returned to the program when pressing a Page Up or a Page Down key will page beyond the end of the subfile. Without ROLLUP or ROLLDOWN, a message is displayed. If control is returned to your program because of the ROLLUP keyword, then the value returned will be the relative record number of the top subfile record on the next page. If control is returned to your program because of the ROLLDOWN keyword then a 1 will be returned in the relative record number field.
SFLSCROLL is not allowed when SFLSIZ equals SFLPAG.
This keyword is valid only for the subfile control record format.
This keyword is helpful when scroll bars are used. (When SFLEND(*SCRBAR) is specified.) When the user interacts with the scroll bar, the hidden field that contains SFLSCROLL contains the relative record number of the record the user wants displayed. Control will only be returned to your program when the user attempts to scroll into parts of the subfile that are not written to or if the enter key is pressed. Another keyword that might be useful is SFLRCDNBR will *TOP as a parameter. After you have added records to the subfile, redisplay the subfile with the SFLRCDNBR in effect. Use the same number for this keyword that was returned to the SFLSCROLL keyword.
You cannot specify the SFLROLVAL, the SFLSCROLL and the SFLRCDNBR keywords for the same field.
Only one SFLSCROLL keyword is allowed in the subfile control record.
Option indicators are not valid for this keyword.
The following example shows how to specify the SFLSCROLL keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R SFLRCD SFL A CTLFLD 1Y 0H SFLCHCCTL A F1 4A O 6 10 A R SFLCTLRCD SFLCTL(SFLRCD) A SFLSNGCHC A SFLPAG(5) SFLSIZ(&SFLSIZ); A SFLDSP SFLDSPCTL A ROLLUP(10) A 10 SFLEND(*SCRBAR) A F3 5S 0H SFLSCROLL A F2 4S 0H SFLRCDNBR(CURSOR *TOP) A SFLSIZ 5S 0P A 1 30'Panel Title' A 4 5'Multiple selection list:'
In this example, field F3 contains the relative record number of the subfile record that is at the top of the subfile when control is given back to the program.