TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - Procedure Modification


Procedure should be generic so that it can easily be used by the multiple JOBS by simple overrides. During the invoking of procedures in the JOB, one can do the following.
  1. Override: Change the dataset names or parameters that are already coded in the procedure.

  2. Addition: Add new datasets or parameters in the already existing steps of the procedure.

  3. Nullify: Omit the datasets or parameters that are already coded in procedure.
If a keyword parameter is to override the parameter or be added to every EXEC statement in the procedure, code the parameter in the usual way.

For example, the ACCT parameter applies to all steps:

//STEP1  EXEC  PROC=RPT,ACCT=5670

If the keyword parameter is to nullify the parameter on every EXEC statement in the procedure, code it without a value following the equal sign.

For example, the ACCT parameter is nullified in all steps:

//STEP2  EXEC  PROC=RPT,ACCT=

If the keyword parameter is to override the parameter or be added to only one EXEC statement in the procedure, code .procstepname immediately following the keyword. The procstepname is the name field of the procedure EXEC statement containing the keyword parameter to be overridden.

For example, the ACCT parameter applies to only step PSTEPWED:

//STEP1  EXEC  PROC=RPT,ACCT.PSTEPWED=5670

If the keyword parameter is to nullify the parameter on only one EXEC statement in the procedure, code it with the procstepname.

For example:

//STEP2  EXEC  PROC=RPT,ACCT.PSTEPTUE=

Note: The override, nullification, or addition applies only to the current execution of the job step; the procedure itself is not changed.

Example: PROC COBCLG has a statement

//COB EXEC PGM=IGYCRCTL,REGION=400K

Let's see JCL below to Override, Add and nullify the parameter in PROC,

//*Overrides the value of 400K
//EXEC COBCLG,REGION.COB=1M

//*Adds 10 seconds time limit for COB step.
//EXEC COBCLG,TIME.COB=(0,10)

//*Nullifies 400K region request. Default region will be allocated now.
//EXEC COBCLG,REGION.COB=

We added few more examples in next chapter to understand this concept more detail.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal