Chapter Contents

Previous

Next
IF

IF



Checks conditions before execution of labeled script statements

All connections


Syntax
Syntax Description

Syntax

IF condition GOTO label;
IF NOT condition GOTO label;

Syntax Description

condition
is the test performed to determine if a set of statements should be executed.

label
is a reference to 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 command 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. For more information about COMAMID= values for emulation software, see COMAMID=.

label must be a reference to a labeled statement in the script. For example, in the following IF statement, ENDIT is a label followed by one or more statements that terminate the link when the user has issued a SIGNOFF command:

if signoff then goto endit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.