Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

ACCT parameter is used to specify account information to which the CPU processing time of the specific step is

billed. It is optional and if not coded, the job accounting information ap

Examples -

Scenario1 - STEP01 with accounting information ACCT7.

//STEP01 EXEC PGM=SAMPLE,ACCT=(ACCT7)

Scenario2 - The accounting information applies to all the steps in the MTHPROC.

//STEP02 EXEC PROC=MTHPROC,ACCT=(ACCT1)

Scenario3 - The accounting information applies to STEPZ in procedure MTHPROC.

//STEP03 EXEC PROC=MTHPROC,ACCT.STEPZ=('/007/')


aplies to the step.

OVERRIDE

Overriding parameters is a technique that allows us to replace the coded parameter values temporarily. This
technique is mainly used to replace the parameter values coded in the PROC from the calling JCL. This way, we
can modify all parameter values without changing the actual PROC.

The overriding parameters can be coded with the EXEC statement at the step level. This is useful when running
the same job with different input or output datasets without changing the PROC.

Overriding parameter can be done in 3 ways -

 Replacing existing parameter.


 Adding new parameter.
 Nullify existing parameters.

Replacing existing parameter -

This overriding type replaces the existing parameter, which is already coded in PROC.

Syntax -

//STEPname EXEC proc-name,modifying-parameter1,


// modifying-parameter2,..
//PROC proc-name

Examples -

PROC - Let us assume the PROC is calling in all steps.

//MTHPROC PROC
//STEP01 EXEC PGM=PROG1,COND=EVEN
//STEPLIB DD DSN=MATEPK.COBOL.LOADLIB,DISP=SHR
//INPUT DD DSN=MATEPK.INPUT.OLDPS,DISP=SHR

PROG1 runs using MATEPK.INPUT.NEWPS as input.

Scenario1 - Changing the dataset name.

JCL -

//STEPPR EXEC MTHPROC


//STEP01.INPUT DD DSN=MATEPK.INPUT.NEWPS,DISP=SHR

Scenario2 - Changing the load library (STEPLIB).

JCL -

//STEPPR EXEC MTHPROC


//STEP01.STEPLIB DD DSN=MATEPK.COBOL.LOADLIB1,DISP=SHR

Scenario3 - Overriding Program name.

JCL -

//STEPPR EXEC MTHPROC,PGM=PROG2

Scenario4 - Overriding COND.

JCL -

//STEPPR EXEC MTHPROC,COND=ONLY

Adding new parameter -


This type of overriding adds the parameter to the statement that is not already coded in PROC.

Syntax -

//STEPname EXEC proc-name,new-parameter1,


// new-parameter2,..
//PROC proc-name

Examples -

Scenario1 - Adding new DSNTYPE.

JCL -

//STEP01 EXEC PROC=MTHPROC


//STEP01.INPUT DD DSNTYPE=LARGE

PROC -

//MTHPROC PROC
//STEP01 EXEC PGM=PROG1
//INPUT DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(3,2),RLSE),
// UNIT=SYSDA,VOLUME=SER=DEVHD4,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)

MATEPK.IEFBR14.PSFILE creates with DSNTYPE parameter which is not coded in PROC.

Scenario2 - Adding COND parameter.

JCL -

//STEPPR EXEC MTHPROC,COND=ONLY

Nullify existing parameters -

This type of overriding deletes the existing parameter that is already coded in PROC.

Syntax -
//STEPname EXEC proc-name
//STEPname.DDname DD parameter1,parameter2,..
//PROC proc-name

Examples -

Scenario1 -Nullify DSNTYPE.

JCL -

//STEP01 EXEC PROC=MTHPROC


//STEP01.INPUT DD DSNTYPE=

PROC -

//MTHPROC PROC
//STEP01 EXEC PGM=PROG1
//INPUT DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(3,2),RLSE),
// UNIT=SYSDA,VOLUME=SER=DEVHD4,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800),
// DSNTYPE=LARGE

MATEPK.IEFBR14.PSFILE creates with DSNTYPE parameter as empty.

You might also like