Procedures: PROC: Grouping jcl statements together and giving them a name. Cataloged Procedure: Grouping JCL statement...
Procedures:
PROC:
Grouping jcl statements together and giving them a name.
Cataloged Procedure:
Grouping JCL statements together , giving them a name and recording the name as a PDS.
In-Stream Procedure:
Grouping JCL statements together , and making them a part of the JCL input stream.
The system is notified about the end of procedure with the keyword PEND.
Not more than 15 in-stream procedures can be coded in a job.
If in-stream procedures are defined within a job,then they must be coded immediately after the JOB statement and before the EXEC statement.
//name PROC
<group of statements
// PEND
Symbolic parameters:
The same jcl can be used by different users , but with different parameters.This is possible through parameter overriding.
Advantage:
Minimizing duplication of code and probability of error.This is because procedure should consist of pre-tested statements.
Rules for coding procedures:
PROC name should be 1-8 chars alphanumeric or national charcaters.
Max 255 Steps.
JOB,EXEC under DD * or DD DATA ,JOBLIB DD
JES2 JES3 statements.
Parameter overriding:
When you wish to use the jcl coded in a procedure which accesses a specific data set,for a different file name,Overriding will be useful.
//name EXEC procedure_name
//procstep.ddname DD modified_parameter,modified_parameter.
When overriding concatenated datasets, those datasets for which you don’t want to override,should be coded as empty.
If inside the proc MUTHU
//SAL DD DSN=MUTHU.FILE1,DISP=SHR
DD DSN=MUTHU.FILE2,DISP=SHR
And MUTHU.FILE2 alone you want to override means,you have to code like follows.
//SAL DD
DD DSN=MUTHU.FILE3,DISP-SHR
An symbolic parameter on a DD statement is coded by preceding the parameter that will be assigned a value with an &.
//name PROC value assigned to symbolic parameters comments
SAMPLE PROC:
//SZRBNN2 JOB 'TG5GGY',
// CLASS=X,MSGCLASS=Y,MSGLEVEL=(1,1),
// NOTIFY=SZRBNN
//*
//COBCOMP PROC
//COBCOMPL EXEC PGM=IGYCRCTL,REGION=2048K,PARM='LIST,DUMP,TEST(SYM)'
//STEPLIB DD DSNAME=SYS2.IGY.SIGYCOMP,DISP=SHR
//SYSIN DD DSN=&SISIN(&MEM),DISP=SHR
//SYSLIB DD DSN=SZRBNN.SOIMA.JCLGEN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSDA,
// DISP=(MOD,PASS),SPACE=(TRK,(3,3)),
// DCB=(BLKSIZE=3200)
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//*
//LKED EXEC PGM=HEWL,COND=(8,LT,COBCOMPL),REGION=1024K
//SYSLIB DD DSNAME=SYS2.CEE.SCEELKED,DISP=SHR
// DD DSNAME=TSMOS.SOIMA.REXX.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
//SYSLMOD DD DSNAME=&LOAD(&MEM),SPACE=(TRK,(10,10,1)),
// UNIT=SYSDA,DISP=(MOD,KEEP)
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//COBCOMP PEND
//*
//STEP1 EXEC COBCOMP,SISIN='TSMOS.SOIMA.REXX',MEM=SIMPLE,
// LOAD='TSMOS.SOIMA.REXX.LOAD'
//*
//MUSA EXEC PGM=SIMPLE,REGION=1024K,COND=(4,LT)
//STEPLIB DD DSNAME=TSMOS.SOIMA.REXX.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
No comments
Post a Comment