Using the execution batch monitoring facility

Before using the execution batch monitoring facility you must:
  • Write and test the program that will process the input. This program must handle any JCL it encounters in the input stream and use DDNAME SYSIN as input.
  • Write and test a procedure to invoke your program.
  • Place the procedure in a library defined in the JES2 start procedure. Figure 1 shows the contents of an example procedure named ORDPROC.
Figure 1. Contents of the Example ORDPROC Member
//PROCESS   EXEC  PGM=ORDERIT
//INPUT     DD    DDNAME=SYSIN
//OUTPUT    DD    DSN=NEEDED.BOOKS,DISP=OLD
//CONTROL   DD    DSN=BACKORD.INVENTOR,DISP=SHR
 
Figure 2. Specifying the Procedure on the JOBCLASS(v) Statement.
    JOBCLASS(R)  ACCT=YES,COMMAND=IGNORE,LOG=NO,MSGLEVEL=(2,0),
                 PERFORM=123,PGMRNAME=YES,PROCLIB=02,
                 XBM=ORDPROC
 

Figure 3 is an example of the JCL coded to submit input to the ORDERIT program. The /*ROUTE statement in the example routes the output to the destination, STR15.

Figure 3. Example JCL to Invoke ORDERIT
//ORDER12   JOB    (STR12,15,5845),HUTCH,CLASS=R
/*ROUTE     PRINT  STR15
  JES2 Exits                 J. Vazquez
  JES2 Commands              P. Kaskovich
  JES2 General Information   D. Wagenaar
  JES2 Introduction          D. Pizzuto
  JES2 Init Tuning Reference T. Koman
  JES2 Init Tuning Guide     J. Hutchinson
If the procedure fails, you can temporarily use another procedure to process the input by:
  1. Holding the job classes that use the failing procedure.
  2. Issuing $T JOBCLASS(v),XBM=newproc to point the job class to a different procedure.
  3. Releasing the job classes you held in the first step.

You can enable the execution batch monitoring facility for a previously defined job class, or switch procedures associated with a job class with the $T JOBCLASS(v) command. The job class can be managed by JES2 or WLM initiators.