IF

Checks conditions of labeled script statements before they execute.

Syntax

IF condition GOTO label;
IF NOT condition GOTO label;

Syntax Description

condition
is the test that is performed to determine whether a set of statements should be executed.
label
specifies a labeled statement in the script.

Details

The IF statement conditionally jumps to another statement in the script. The IF statement can check two conditions: connection type and whether the script has been called by the SIGNON or the SIGNOFF command.
If the statement is testing for sign-on or sign-off, condition should be one of the following:
SIGNON
specifies that the SIGNON command invoked this script.
SIGNOFF
specifies that the SIGNOFF command invoked this script.
If the statement is testing for connection type, condition should be either FULL SCREEN or one of the values for the COMAMID= system option.
The value FULLSCREEN can be used to detect any full-screen 3270 connection. The remaining values correspond to values for the COMAMID= system option.
label must specify a labeled statement in the script. For example, in the following IF statement, ENDIT is a label that is followed by one or more statements that terminate the link when the user has issued a SIGNOFF command:
if signoff then goto endit;