CHANGE (Change) keyword for display files

Use this record- or field-level keyword to set on the specified response indicator for an input operation.

This is done under the following conditions:

See the System/36 environment considerations for display files topic for information about how to specify the CHANGE keyword in files that are used in the System/36™ environment.

The format of the keyword is:
CHANGE(response-indicator ['text'])

The MDT of an input-capable field is set on when the display station user keys into the field, or when your program selects the display attribute (DSPATR(MDT)) keyword for the output operation that displays the field. If the MDT is set on using the DSPATR(MDT) keyword, the data in the field might not have changed even though the MDT (and hence the response indicator specified for CHANGE) is set on. Also, note that the MDT is set on even if the workstation user keys the same data in the field as was initially displayed (such as typing into a blank field and then blanking the field).

Note: The CHANGE response indicator is not set on when a command attention key (CAnn, Help, Print, Home, or Clear) is pressed.

When the i5/OS™ operating system detects validity checking errors and displays the record again with an error message, any CHANGE keyword response indicators that have been set on by typing into fields remain on until all validity checks succeed and the record is passed to your program.

The optional text is included on the list created at program compilation time to explain the intended use of the indicator. This text has no function in the file or the program other than as a comment. The single quotation marks are required. If you specify more than 50 characters between the single quotation marks, the text is truncated to 50 characters on the program computer printout.

Option indicators are not valid for this keyword.

Example 1

The following example shows how to specify the CHANGE keyword at the field level.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A            FLDX           5   B  8  2CHANGE(67 'FLDX was changed')
     A
00020A            FLDY           3   I  8 30CHANGE(68 'FLDY was entered')
     A

Example 2

The following example shows how to specify the CHANGE keyword at the record level.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R REC1
00020A                                      CHANGE(88 'A field was changed')
00030A*
00040A            FIELD1        10   B  3  2
00050A            FIELD2         5   B  5  2
00060A            FIELD3         6   B  7  2
00070A            FIELD4         3   I  9  2DFT('ABC')
     A
Related concepts
CHANGE record-level keyword