CALL |
DEVELOPER |
|
|
Purpose |
CALL calls a step within a logic routine. |
Syntax |
CALL step-number |
Operation |
step-number is the number, or a variable or expression representing the number, of the step to which control is to be passed. It has a value between 1 and 99 inclusive. |
Remarks |
The step called may be processed with an optional RETURN. If a RETURN is specified, control returns to the statement following the calling statement. |
Example |
CALL 1 If the condition $J = $K is true, the logic routine is exited. In Step 3 $E is set to GHI. Control is returned to the statement following the calling statement. The remaining statements in the logic routine, up to but not including Step 1, are processed. The practice of omitting a RETURN is not recommended. In this example an EXIT can be inserted after step 2 (instead of RETURN) to ensure step 2 ends with a RETURN without changing the meaning of the overall logic. |
The use of CALL should be limited; it can produce disjointed code that is difficult to read. Consider using Global Logic instead. |
Topic ID: 520025