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
- Use XBM= on the JOBCLASS(v) initialization statement to specify the name of the data set member that contains the procedure. Figure 2 shows a JOBCLASS(v) statement coded to take advantage of the execution batch monitoring facility.
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
- Issue $P JES2 to stop JES2 and close the procedure libraries.
- Issue S JES2 to restart JES2 and open the procedure libraries. JES2 can now access your procedure and you can submit jobs that use the procedure.
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:
- Holding the job classes that use the failing procedure.
- Issuing $T JOBCLASS(v),XBM=newproc to point the job class to a different procedure.
- 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.