Use this record-level keyword to specify a starting line number for the record format you are defining.
If specified, SLNO adjusts the actual line numbers for each field in the record format. If you do not specify SLNO, fields in the record format are displayed on the lines you specify for them in positions 39 through 41.
SLNO(n | *VAR)
To calculate the line on which a field is actually displayed, subtract one from the line number specified in positions 39 through 41 and add the starting line number to the result. The record format begins on the line specified with SLNO unless a field is defined at line 1, position 1. In that case, the beginning attribute byte is in the last position of the previous line and the starting line of the format is one less than that specified by SLNO.
When *VAR is specified, no field in the record can occupy the last position on the display.
If a CLRL(nn) or CLRL(*END) keyword is also in effect for this record when it is to be displayed, lines on the display are cleared beginning with the starting line number for the format.
If you use the SLNO(*VAR) keyword with the OVERLAY keyword but without the CLRL keyword and then write the record several times, each time with a different starting number, the previous record is deleted before the new record displays.
ERRMSG
ERRMSGID
PUTOVR
PUTRETAIN
If the starting numbers are the same, the actions specified by the ERRMSG, ERRMSGID, PUTOVR, or the PUTRETAIN keyword is performed.
If the starting line numbers are not the same, the ERRMSG, ERRMSGID, PUTOVR, or PUTRETAIN keyword is ignored, and the record format displays with the lines adjusted to the new value.
ASSUME
KEEP
SFL
SFLCTL
USRDFN
SLNO cannot be specified for the record format specified by the PASSRCD keyword.
Option indicators are not valid for this keyword.
The following example shows how to specify the SLNO keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 SLNO(*VAR) 00020A FIELD1 5 I 2 2 00030A FIELD2 5 B 3 2 00040A 00050A R RECORD2 SLNO(2) 00060A FIELD3 5 10 2 00070A FIELD4 5 B 10 13 A
In this example, when the starting line number is zero or one, FIELD1 is displayed on line 2 and FIELD2 is displayed on line 3, as specified. When the starting line number is set to 2 in your program, FIELD1 is displayed on line 3 (2 - 1 + 2 = 3) and FIELD2 is displayed on line 4 (2 - 1 + 3 = 4).
FIELD3 and FIELD4 are always displayed on line 11 (2 - 1 + 10 = 11).