RUN TASK Examples for CA-7 (z/OS to z/OS)

The following is an example of a RUN TASK statement that interfaces with the CA-7 scheduling package. The U7SVC program is supplied by CA-7, the job scheduling system by Computer Associates International, Inc. The U7SVC program may return a code of 0, regardless of completing the request.

For Processes with RUN TASK statements running U7SVC programs, replace xx with the length of the entire PARM including the d=.

STEP01  RUN TASK  (PGM=U7SVC,             -
                   PARM=(CLxx"d=&dsn") )  -
                   SNODE

In the following example, the symbolic variable, &UCC7DSN, is resolved to Z456789.TARGET, which is the proper format for the U7SVC program.

Note: To properly execute with CA-7, Connect:Direct® for z/OS® must not be running under CA-7 control.
PROC02  PROCESS      SNODE=CD.NODEB                        -
                     &DSN1=Z123456.SRC                     -
                     &DSN2=Z456789.TARGET
HF201   COPY  FROM  (DSN=&DSN1 DISP=SHR)                   -
              TO    (DSN=&DSN2 DISP=(RPL,CATLG))
                     SYMBOL      &UCC7DSN=&DSN2
        IF  (HF201=0)  THEN
HF202        RUN TASK (PGM=U7SVC,PARM=(CLxx"D=&UCC7DSN"))  -
                        SNODE
        EIF

The following RUN TASK statement shows another way to interface with CA-7:

STEP01  RUN TASK  PGM=U7SVC,                              -
                  PARM=(\xd5 DEMAND,JOB=\ || &POSTJOB ||  -
                        \,SCHID=001’\))                   -
                  SNODE