Use this record-level keyword on the subfile control record format to return an indication of whether the subfile was in folded or truncated mode on input. You can use this keyword in conjunction with the (Subfile Cursor Relative Record Number (SFLCSRRRN) keyword to determine the location of the cursor within a subfile.
SFLMODE(&mode);
The mode parameter is required. It specifies the name of a hidden field that, on input, will contain the subfile mode. The field must be defined in the subfile control record format as a character (A in position 35) field of length 1 with usage H (hidden). The field will contain the value 0 if the subfile is in folded mode; it will contain the value 1 if the subfile is in truncated mode.
If a SFLDROP or SFLFOLD keyword is not specified on the subfile control record, the mode value returned is 0.
Option indicators are not valid for this keyword.
The following example shows how to specify the SFLMODE and SFLCSRRRN keywords.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R SFL01 SFL A FLD2A 2A I 3 2 A FLD2B 30A O 3 5 A FLD2C 6A O 4 18 A R CTL01 SFLCTL(SFL01) A SFLSIZ(25) A SFLPAG(4) A SFLDSP A SFLEND A SFLCSRRRN(&RELRCD); A SFLMODE(&MODE); A 10 SFLDROP(CF03) A 11 SFLFOLD(CF03) A RTNCSRLOC(&CSRRCD &CSRFLD); A RELRCD 5S 0H A MODE 1A H A CSRFLD 10A H A CSRRCD 10A H A A R SFL02 SFL A FLD2A 2A I 13 2 A FLD2B 30A O 13 5 A FLD2C 6A O 14 18 A R CTL02 SFLCTL(SFL02) A SFLSIZ(25) A SFLPAG(4) A SFLDSP A SFLEND A SFLCSRRRN(&RELRCD); A SFLMODE(&MODE); A 12 SFLDROP(CF03) A 13 SFLFOLD(CF03) A RTNCSRLOC(&CSRRCD &CSRFLD); A RELRCD 5S 0H A MODE 1A H A CSRFLD 10A H A CSRRCD 10A H A
Indicators 10 and 13 are on. Two records were added to both subfiles. Both subfiles are displayed.
The following table shows the values returned for CTL02 when the cursor is at the specified positions.
Row | Column | RELRCD | MODE | CSRRCD | CSRFLD |
---|---|---|---|---|---|
13 | 2 | 1 | 0 | SFL02 | FLD2A |
14 | 18 | 1 | 0 | SFL02 | FLD2C |
15 | 2 | 2 | 0 | SFL02 | FLD2A |
15 | 62 | 1 | 0 | SFL02 | blanks |
17 | 2 | 0 | 0 | SFL02 | blanks |
24 | 2 | 0 | 0 | blanks | blanks |
3 | 2 | 0 | 0 | SFL01 | FLD2A |
The following table shows the values returned for CTL01 when the cursor is at the specified positions.
Row | Column | RELRCD | MODE | CSRRCD | CSRFLD |
---|---|---|---|---|---|
3 | 2 | 1 | 1 | SFL01 | FLD2A |
4 | 18 | 2 | 1 | SFL01 | FLD2B |
5 | 18 | 0 | 1 | SFL01 | blanks |
13 | 2 | 0 | 1 | SFL02 | FLD2A |