SFLNXTCHG (Subfile Next Changed) keyword for display files

Use this record-level keyword on the subfile record format to force the workstation user to correct program-detected typing errors in subfile records that have been read by the program.

It does this by causing a record to be changed so that a get-next-changed operation must read the record as described in the following section.

This keyword has no parameters.

Subfile operations with SFLNXTCHG

A typical use of SFLNXTCHG can be as follows:

A workstation user changes some records in a displayed subfile (this can be for a data-entry application or a data-update application). After changing some records, the workstation user presses the Enter key, and the program reads only the changed records with get-next-changed operations. (For example, READC in RPG III and READ-SUBFILE-NEXT-MODIFIED in COBOL.)

If the program detects typing errors in the changed records, it can send update operations (UPDATE in RPG IV, REWRITE SUBFILE in COBOL) to the subfile records in error, setting indicators so that SFLNXTCHG is in effect during the update operations. These update operations are sent to the subfile record format.

After all the records in error have been updated, the program sends an input/output operation to the subfile control record format to display the subfile again.

With the subfile displayed again, the workstation user types the data again and presses the Enter key. If the data is correct, the program does not display the subfile again.

The records in error (and any other records changed by the workstation user) are returned to the program on the next get-next-changed operation. This is because SFLNXTCHG caused the subfile records to be considered changed even though the workstation user did not change them. This allows the program to prohibit the workstation user from ignoring program-detected typing errors in subfile records.

Subfile operations without SFLNXTCHG

If SFLNXTCHG is not specified, or is specified but not selected on the update operations to the subfile records, then the workstation user can press the Enter key instead of correcting the program-detected errors. The program then reads no records because the get-next-changed operations find no changed records the second time the Enter key is pressed.

Option indicators are valid for this keyword.

You cannot specify SFLNXTCHG with the SFLMSGRCD keyword.

Example

The following example shows how to specify the SFLNXTCHG keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R SFLR                      SFL
00020A  14                                  SFLNXTCHG
     A*
     A*           (at least one input-capable field should be specified)
     A*
00040A          R SFLCTLR                   SFLCTL(SFLR)
00050A                                      SFLPAG(17)
00060A                                      SFLSIZ(17)
00070A                                      SFLDSP SFLDSPCTL
     A