SFLINZ (Subfile Initialize) keyword for display files

You use this record-level keyword on the subfile-control record format to specify that the IBM® i operating system is to initialize all records in the subfile on an output operation to the subfile-control record format identified by the SFLCTL (Subfile Control) keyword.

The fields in each subfile record are initialized to blanks for character type fields, to nulls for floating-point type fields, to zeros for other numeric type fields, or to the constant value specified on input-only fields if the DFT keyword is specified.

When the subfile is displayed (on an output operation to the subfile control record), all records in the subfile are displayed with the same value. Any record previously written is overwritten and no longer has its earlier value.

This keyword has no parameters.

The following case is true when SFLINZ is in effect on an output operation to the subfile-control record format. If keywords (such as DSPATR(HI)) are specified on fields in the subfile record format and if option indicators are specified on those keywords, the subfile is displayed as though all option indicators are off (hex F0). Note that a keyword can be selected if N is specified for the option indicator.

After your program sends an output operation to the subfile control record with SFLINZ in effect, all records in the subfile are considered active but not changed. They are considered changed only when the workstation user changes them or when your program sends an output operation to the subfile record format with the SFLNXTCHG keyword in effect.

To initialize a subfile with no active records, use the SFLRNA (Subfile Records Not Active) keyword.

In general, use SFLINZ for the following purposes:
  • Specify SFLINZ with the SFLRNA keyword so that your program can initialize a subfile, then add records to that subfile without having the initialized records considered active.
  • Specify SFLINZ with the SFLPGMQ keyword so that your program can build a message subfile with a single output operation.
Notes:
  1. If field selection is used in the subfile record format, SFLINZ is not valid. Your program can only initialize the subfile by a series of output operations to the subfile record format, selecting fields as needed.
  2. SFLINZ cannot be specified on the subfile-control record format for a message subfile (SFLMSGRCD) unless the SFLPGMQ keyword is also specified at the field level in the same subfile-control record format.

Option indicators are valid for this keyword. Display size condition names are not valid.

Example

The following example shows how to specify the SFLINZ keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SFLR                      SFL
00020A*
00030A*           (at least one displayable field)
00040A          R SFLCTLR                   SFLCTL(SFLR)
00050A                                      SFLPAG(17)
00060A                                      SFLSIZ(17)
00070A  01                                  SFLDSP SFLDSPCTL
00080A  02                                  SFLINZ
00090A                                      UNLOCK(*ERASE *MDTOFF)
     A