Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

IF

&pagelevel(3)&pagelevel

Start IF block

Component:

SDF-P-BASYS

Functional area:

Procedures

Domain:

PROCEDURE

Privileges:

STD-PROCESSING
HARDWARE-MAINTENANCE
SECURITY-ADMINISTRATION                                                              
SAT-FILE-MANAGEMENT
SAT-FILE-EVALUATION

Function

IF is an SDF-P control flow command.

The IF command initiates an IF block within an S procedure. Depending on the value of a logical expression (see section "SDF-P-BASYS"), the IF block makes it possible to execute alternative command sequences. The IF block is terminated by the END-IF command.
If the logical expression is true, all subsequent commands until the associated ELSE-IF, ELSE or END-IF command are processed.
If the logical expression is false, the associated ELSE-IF conditions are checked. If they are also false, processing resumes with the ELSE command.
If the IF block does not contain an ELSE-IF command block, control branches to the ELSE command block. If there is no ELSE command block either, the IF block is exited, i.e. processing resumes with the command following the END-IF command.

The ELSE-IF command is only available with the chargeable SDF-P subsystem.

Restrictions

Users with SECURITY-ADMINISTRATION, SAT-FILE-EVALUATION or SAT-FILE-MANAGEMENT privilege can use the command in procedures only.

Format

IF                                                                                                                                                                 

CONDITION = <text 0..1800 with-low bool-expr>

Operands

CONDITION = <text 0..1800 with-low bool-expr>
Logical expression whose value determines processing in the IF block. The rules governing the formation of logical expressions are described in “SDF-P-BASYS” [34]. 

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error


1

CMD0202

Syntax error


1

SDP0118

Command in incorrect context


1

SDP0223

Incorrect environment


3

CMD2203

Incorrect syntax file


32

CMD0221

System error (internal error)


64

SDP0091

Semantic error


130

SDP0099

No further address space available

Example

/COND-1:     IF ( A = B )
/               commandsequence1     "executed if condition true"
/                .
/                .
/                .
/          ELSE
/             commandsequence2  "executed if condition false"
/                .
/                .
/                .
/          END-IF

Command sequence 1 is executed if variable A equals variable B. Otherwise command sequence 2 is executed.