Examples of a RUN Statement

The following example invokes procedure SIMPL, which has no parameters, as an independent program. The task TSK is copied by the operating system for SIMPL to use as its task variable.

RUN SIMPL [TSK]

The following example invokes procedure DOOER as an independent program, passing the four parameters X, Y, Z, and the string literal "ABCD". Though the value "ABCD" appears as a string literal, it is passed to a call-by-value REAL parameter. The task designated by TSKARRAY[INDEX] is used by DOOER as its task variable.

RUN DOOER(X,Y,Z,"ABCD") [TSKARRAY[INDEX]]

The following example invokes the procedure P_EXT as an independent program using the NAME task attribute.

TASK TSK;
PROCEDURE P_EXT; EXTERNAL;
REPLACE TSK.NAME BY "SYSTEM/INTERFACE.";
RUN P_EXT[TSK];