Use this field-level keyword on the subfile control record format to specify that the page of the subfile to be displayed is the page containing the record whose relative record number is in this field.
If you do not specify this keyword, the i5/OS™ operating system displays the first page of the subfile by default.
SFLRCDNBR[([CURSOR] [*TOP])]
If CURSOR is specified, the cursor is placed in the subfile record whose relative record number is identified by the contents of this field. The cursor is positioned at the first input-capable field in the subfile record. If there is no input-capable field, the cursor is positioned at the first output-only or constant field. For example, if a page can contain three records, and nine records are contained in the subfile, a SFLRCDNBR field value of 8 causes records 7, 8, and 9 to be displayed. If CURSOR is specified, the cursor appears in record 8.
If *TOP is specified, the subfile record whose relative record number is identified by the contents of this field will display as the first record of the page of the subfile records being displayed.
This field must be a zoned decimal field with zero decimal positions. It must have the keyboard shift attribute of signed numeric (S in position 35), and it can be up to 4 digits in length. It must be defined as an output-only, an input/output, or a hidden field. If a value less than 1 or a value greater than the number of records in the subfile is contained in this field on an output operation to the subfile control record format, an error is returned to your program.
This optional keyword is valid only for the subfile control record format.
You cannot specify both SFLRCDNBR and SFLROLVAL for the same field.
If the subfile record format contains field selection, this keyword is not allowed.
Option indicators are not valid for this keyword.
The following example shows how to specify the SFLRCDNBR keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R SFLR SFL A* A* (at least one displayable field) A* 00040A R SFLCTLR SFLCTL(SFLR) 00050A SFLPAG(17) 00060A SFLSIZ(17) 00070A SFLDSP SFLDSPCTL 00080A DSPREC 4S 0B 4 12SFLRCDNBR(CURSOR) A
In this example, either the program or the workstation user can set the value of the field before displaying the subfile.