Previous Topic

Next Topic

Book Contents

Book Index

Passing Arguments While Invoking Control-M/Analyzer

Arguments can be passed when directly invoking Control-M/Analyzer through the CONTROLB procedure by specifying the following in the JCL statements of the job step:

// EXEC   CONTROLB,RULE=rule,GROUP=group,MISSION=mission,ARG=arglist

The variables in this statement are:

The arguments specified in arglist are stored in the RARGnn System variable. In this variable, nn is a 1- or 2-digit number that represents the position of the argument in arglist. To access the value of the first argument in the list, specify RARG1.

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 data set exists at the site. The JCL continues to run according to the result of the Control-M/Analyzer activation.

Figure 9 Argument Passing – Sample JCL

//CHKTAPE   JOB    ,TAPE,CLASS=A,MSGCLASS=X

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

//COPYTAPE  EXEC  PGM=IEBCOPY,COND=(0,NE)

//SYSPRINT  DD    SYSOUT=*

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

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

//                VOL=(,RETAIN,,,SER=TAPE1899),UNIT=TAPE,

//                 LABEL=(1,SL)

//SYSIN     DD     *

    C   O=OUT,I=IN

//

Figure 10 Argument Passing – Sample Rule Definition

LIBRARY : CTB.PROD.RULES                                RULE : RULARG

   OMMAND ===>                                                    SCROLL===> CRSR

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

       OWNER   USER5                    GROUP PROD1                               

       UPDATED 07/07/99  -  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 <<<<<<<<<<<<<<< =====

 PLEASE FILL IN RULE DEFINITION.                                        13.25.00

Parent Topic

Invoking the Control-M/Analyzer Runtime Environment