SFLCSRRRN (Subfile Cursor Relative Record Number) keyword for display files

You use this record-level keyword on the subfile-control record format to return the relative record number of the record on which the cursor is located within a subfile.

If the subfile records occupy more than one line, use this keyword in conjunction with the SFLMODE keyword to determine the location of the cursor.

The format of the keyword is:
SFLCSRRRN(&relative-record);

The relative-record parameter is required. It specifies the name of a hidden field that, on input, will contain the relative record number of the subfile record on which the cursor is located. The field must be defined in the subfile-control record format as a signed numeric (S in position 35) field of length 5, with 0 decimal positions and usage H (hidden).

The relative-record field will contain the value 0 if the cursor is not located in the subfile associated with this subfile control record, or if the cursor is located within the subfile, but is not in an active record within the subfile. If the SFLMODE keyword is specified, the mode of the subfile will be returned in either case.

This keyword can be used on subfiles with field selection or subfiles with the SFLLIN keyword. If the cursor is located between two horizontal subfile records, the relative record number returned is 0.

For an example of how to specify the SFLCSRRRN keyword, see SFLMODE (Subfile Mode) keyword for display files.