SETOF (Set Off) keyword for display files

You use this record-level keyword to specify that when an input operation sent to this record format is completed, the specified response indicator is to be set off.

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

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

The optional text is included on the computer printout created at program compilation to explain the intended use of the indicator. This text functions only as a comment in the file or program. 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 listing.

This keyword can be used to cause an option indicator that is on for an output operation to be returned in the off condition when the next input operation to the record is completed. (If no input operation is performed, the response indicator remains unchanged.) Your program does not need to turn off the indicator.

SETOF is equivalent to the SETOFF keyword.

Any indicator is valid for this keyword. It does not need to be previously defined as an option or a response indicator. The indicator becomes a response indicator when you specify SETOF.

If the indicator used with the SETOF keyword is also used with another keyword, such as CHANGE, the on/off status of the indicator is controlled by the other keyword.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the SETOF keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R CUSMST                    SETOF(63 'On=display MSG2000 +
00020A                                         CONSOLEMSG')
00030A            QRYORD         3  0I  5  3
00040A  63                                  ERRMSGID(MSG2000 CONSOLEMSG)
     A

A MSG2000 message is displayed on the message line when the program sends an output operation to CUSMST with indicator 63 set on. On the next input operation to CUSMST, the SETOF keyword sets off indicator 63. (Indicator 63 is used as both an option and a response indicator.)