Sign in

docs DDS Display

SFLMODE (Subfile Mode) keyword for display files

SFLMODE (Subfile Mode) keyword for display files

You 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 use this keyword with the SFLCSRRRN (Subfile Cursor Relative Record Number) keyword to determine the location of the cursor within a subfile.

The format of the keyword is:

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.

Example

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.


RowColumnRELRCDMODECSRRCDCSRFLD
13210SFL02FLD2A
141810SFL02FLD2C
15220SFL02FLD2A
156210SFL02blanks
17200SFL02blanks
24200blanksblanks
3200SFL01FLD2A

The following table shows the values returned for CTL01 when the cursor is at the specified positions.


RowColumnRELRCDMODECSRRCDCSRFLD
3211SFL01FLD2A
41821SFL01FLD2B
51801SFL01blanks
13201SFL02FLD2A