STATUS
System Testing Supervisor Script Language.
Purpose
STATUS is an integer operator that retrieves the code returned by a remote process when it terminates.
Syntax
STATUS ( process )
where:
-
<process> is a logical process identifier
Description
The execution of a STATUS expression does not block execution of the scenario.
Applying STATUS to an ongoing process always returns a zero value. We recommend you use the STATUS operator in conjunction with ENDOF.
Note If you place an EXECUTE or DO instruction inside a WHILE loop, the process identifier denotes a group of processes. In this case, a STATUS expression returns a binary result or code from all the processes in the group. For example, if ten processes terminate with a return code of 0 and one process terminates with the return code of 1, the STATUS operator returns the value 1.
Example
EXECUTE proc_1 IS machine:foo0098
WHILE !ENDOF(proc_1)
PAUSE 1
END WHILE
j = STATUS ( proc_1 )
IF j != 0 THEN
PRINT "incorrect termination of program -> "
PRINTLN j
EXIT
END IF
Related Topics