Connect:Direct for z/OS Run Task Statement

The RUN TASK statement attaches user programs or subtasks during Process execution. When a IBM® Connect:Direct® Process issues a RUN TASK statement, the IBM Connect:Direct Process waits until the subtask finishes before executing the next IBM Connect:Direct Process step.

You can pass a list of user parameters to the subtask from the RUN TASK statement. The RUN TASK statistics log records the return code of the subtask, program name, parameter list, and dates and times for starting and completing the subtask.

Parameters are passed in upper case using the PARM parameter. Parameters are passed in mixed case using the SYSOPTS parameter. (A double-quoted SYSOPTS string can contain up to 1816 bytes.)

The subtask can be attached at either the PNODE or SNODE. The subtask must reside in a load library that can be accessed by the target (SNODE or PNODE) IBM Connect:Direct server.

Note: Run Task cannot execute C or C++ programs that contain a "main()" routine or enclave. Using Run Task to execute such a program results in a U4093 ABEND and creates error CEE5151C in SYSOUT. The return code 156 is generated with a reason code of 0D070201.

The following is the Connect:Direct for z/OS® RUN TASK statement format. Refer to Connect:Direct for z/OS Process Parameters for more information.

Label Statement Parameters
stepname RUN TASK (PGM=program-name
    PARM=(parameter [,parameter,...]) SYSOPTS="parameter [,parameter,...]"
    )
    PNODE | SNODE
    RESTART=YES|NO