*IF Test Condition

*IF SETSW [ON|OFF]=n  cmd

The task switch n will be tested. If the tested switch condition is true, the specified command, cmd, will be executed.

cmd any CFS procedure language statement. The standard asterisk that prefixes statements must not be included.

Notes:

The task switch 31 is used by CFS to indicate errors. If, for example, no data objects matching the specification are found during a selection operation, this switch will be set. In procedure-controlled mode, this case will be treated as if FILENAME-SELECT : NO was specified in the Selection mask. The second mask will be displayed, where only the COMMAND field will be displayed. In non-procedure mode, the Selection mask will be displayed with the respective error message.

Task switch 31 will also be set if any errors are encountered during ONXCOPY/ ONXSEL/ ONXADD Variable Actions.

If task switch 31 is to be checked in a procedure, it should always be reset before any CFS action which may alter its state. (Command /SETSW OFF=31).