Previous Topic

Next Topic

Book Contents

Book Index

Example

The following sample JCL and rule definition demonstrate how an argument can be passed when invoking Control‑M/Analyzer. In this case, the value PROD1.COPY.FILE1 is passed to Control‑M/Analyzer as an argument. In Control‑M/Analyzer, this value is checked to indicate whether the dataset exists. The JCL continues to run according to the result of the Control‑M/Analyzer activation.

//CHKTAPE   JOB    0,ACCT,CLASS=A,MSGCLASS=X,COND=(0,NE)

//CTB       EXEC   CONTROLB,RULE=RULDSN,ARG='PROD1.COPY.FILE1'

//COPYTAPE  EXEC   PGM=IEBCOPY

//SYSPRINT  DD     SYSOUT=*

//IN        DD     DSN=PROD.COPY.FILE1,DISP=SHR

//OUT       DD     DISP=(NEW,PASS),DSN=COPY.FILE1,

//                 VOL=SER=TAPE18,UNIT=TAPE,

//                 LABEL=(1,SL)

//SYSIN     DD     *

    C   O=OUT,I=IN

//

        LIBRARY : CTB.PROD.RULES                                RULE : RULDSN 

COMMAND ===>                                                    SCROLL===> CRSR

     +--------------------------------------------------------------------------+

       OWNER   M42A                     GROUP PROD1                                

       UPDATED 10/10/00 ‑  12:19:37    BY M42A                                   

       DESC                                                                        

       OPTIONS                                                                     

 

 

=========================================================================== 

       EXECUTE BLOCK1   UPON                                                   C   

       ON DATA                                                                     

       IF       ISDSN('%%RARG01')                                              C   

         DO TERMINAT = OK       COD 0000                                           

       ELSE                                                                        

         DO PRINT    = FILE %%RARG01 DOES NOT EXIST                        F   C   

         DO TERMINAT = NOTOK    COD 0008                                           

 

       =========================================================================== 

       EXECUTE          UPON                                                   C   

       ON                                                                          

     ======= >>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====

Parent Topic

Passing Arguments While Invoking Control-M/Analyzer