ADVANCED JCL FEATURES
//DD1 DD DSN=A,DISP=SHR
// DD DSN=B,DISP=SHR
• The order of DD statements determines the order in which the program accesses the data sets
• If the record length of the first DD statement is not MAX then an abend will occur. To avoid this either
• Code the DCB parameter with largest block size in first DD statement if the first data set is not the one with largest block size or LRECL.
// DD2 DD DSN=A,DISP=SHR,
// DCB=LRECL=131
// DD DSN=B,DISP=OLD
OR
//DD2 DD DSN=A,DISP=SHR,
// DCB=BLKSIZE=23200
// DD DSN=B,DISP=OLD
// DD DSN=C,DISP=OLD
• Function and position of referback
• Coding DCB, DSN, and VOLUME referbacks
• Referbacks will improve consistency
• Referbacks make coding easier.
CODING DCB
// JOB Statement.…….
//STEP1 EXEC ……
//INPF DD DSN=TEST.INFILE,DISP=OLD
//INTF DD DSN=TEST.INTFILE,
// DISP=(,CATLG),DCB=BLKSIZE=8000
……
//OUTF DD DSN=TEST.OUTF,
// DISP=(,CATLG,DELETE),
// DCB=*.INTF
• Same procedure for DSN
REFERBACKS TO OTHER JOB STEPS
REFERBACKS TO PROCEDURES
• When referring procedures (in-stream/catalog)
• DCB=*.stepname.procstepname.ddname
• DSN=*.stepname.procstepname.ddname
Certain attributes are defined at system startup. Few are:
• How to process report
• Report line is 80 or 132 character
• NO of lines per page
• What time the report should print etc
• E.g : A=line print, 132 char, B=card punch
//OUT2 OUTPUT CLASS=n
where n =A to Z or 0 to 9.
• CLASS=* requests output from MSGCLASS in JOB statement.
• CLASS on SYSOUT DD overrides CLASS on OUTPUT statement.
• To nullify CLASS parameter in SYSOUT DD
• //DD2 DD SYSOUT=(,), OUTPUT=*.OUT2
• Specifies the type of forms on which the sysout data set is to be printed or punched.
• //PRT2 OUTPUT FORMS=form name
• Form name is2 to eight alphanumeric or national character
• SYSOUT DD FORMS parameter overrides OUTPUT FORMS parameter.
//JOBNAME JOB ….
/OUTRPT OUTPUT DEST=HQS,COPIES=3,FORMS=PQ
//STEP1 EXEC PGM=A
//NAME1 OUTPUT DEST=LP
//DD1 DD SYSOUT=A,OUTPUT=*.OUTPRT
//STEP2 EXEC PGM=B
//DD2 DD SYSOUT=A,OUTPUT=*. OUTPRT
//STEP3 EXEC PGM=C
//DD3 DD SYSOUT=A,OUTPUT=*.OUTPRT
//JOBNAME JOB ….
//STEP1 EXEC PGM=A
//DD1 DD SYSOUT=A,DEST=LP
//STEP2 EXEC PGM=B
//DD2 DD SYSOUT=A,DEST=LP
//STEP3 EXEC PGM=C
//DD3 DD SYSOUT=A,DEST=LP
//JOBNAME JOB ….
//NAME 1 OUTPUT DEST=LP
//STEP1 EXEC PGM=A
//DD1 DD
SYSSOUT=A,OUTPUT=*.NAME1
//STEP2 EXEC PGM=B
//DD2 DD SYSOUT=A,OUTPUT=*.NAME1
//STEP3 EXEC PGM=C
//DD3 DD
SYSOUT=A,OUTPUT=*.NAME1
CREATE MULTIPLE PRINTOUTS WITH DIFFERENT OUTPUT CHARACTERISTICS
//JOBNAME JOB ….
/OUT1 OUTPUT DEST=HQS,COPIES=3,FORMS=STDPRT
//OUT2 OUTPUT DEST=BRNOFE,COPIES=3,FORMS=UPDATE
//STEP2 EXEC PGM=A
//DD2 DD SYSOUT=C,OUTPUT=(*.OUT1,*.OUT2)
CODING EXPLICIT AND IMPLICIT REFERENCES
EXPLICIT REFERENCES
//OUT2 OUTPUT CLASS=H
…….
//DD2 DD SYSOUT=(,), OUTPUT=*.OUT2
IMPLICIT REFERENCES
• Code DEFAULT=YES
• JOB or STREP has a default output JCL statement
//OUT2 OUTPUT DEFAULT=YES
…….
//REP2 DD SYSOUT=A
CODING EXPLICIT AND IMPLICIT REFERENCES
//JNAME JOB , MSGCLASS=A
//WKOUT OUTPUT DEFAULT=YES, DEST=HQS,FORMS=PQ
//OUTA OUTPUT DEST=LOCAL,FORMS=STD
//STEP2 EXEC PGM=OUTWRTE
//RPT1 DD SYSOUT=A
//RPT2 DD SYSOUT=A
//STEP2 EXEC PGM=INWRTE
//RPT3 DD SYSOUT=B,OUTPUT=*.OUTA
//RPT4 DD SYSOUT=B
……..
* STEP LEVEL DEFAULT=Y OVERRIDES JOB LEVEL
COMBINE SEVERAL SYSOUT DDS INTO GROUPS
//JOBNAME JOB , MSGCLASS=A
//WKOUT OUTPUT GROUPID=GRP2,
// COPIES=3,FORMS=PQ
//STEP1 EXEC PGM=OUTWRITE
//OUTA OUTPUT DEST=LOCAL,FORMS=STD
//DD1 DD SYSOUT=A,OUTPUT=(*.OUTA,*.WKOUT)
//STEP2 EXEC PGM=INWRITE
//OUTB OUTPUT DEST=LOCAL,FORMS=222
//DD2 DD SYSOUT=A,OUTPUT=(*. OUTB,*.WKOUT)
//DD3 DD SYSOUT=A
Definition
Condition (COND) is a keyword parameter that tests a return code against a test code.
• The result of this test determines if a job or step will be executed or bypassed.
• Format COND=(tcode,oper)
• tcode=test code, oper = operator
• Can be coded on JOB or EXEC statements
• JOB may have only test code and operator.
Test code (tcode)
Operator (oper)
COND PARAMETER
• Return code is drawn from the name of the step.
• If step name is not specified, return code from all previous steps will be tested.
COND PARAMETER
Previously executed step within a JOB
COND=(tcode,oper,stepname).
//JOB2 JOB ……
//STEP1 EXEC ……
//STEP2…..
//STEP3 EXEC PGM=ABC,COND=(4,GT,STEP1)
COND PARAMETER
COND PARAMETER
//PROC2 PROC
//HRCAL EXEC …..
//STEP2 EXEC PROC2
……
//STEP5 EXEC PGM=A,COND=(0,GT,STEP2.HRCAL)
COND=((4,GT),(8,LT))
COND=((0,NE,STEP03),(0,NE,STP04))
• Unlike JOB , EXEC can have several subparameters
• EVEN and ONLY are used only in the case of abend.
• Can be included along with condition code test or can be coded alone.
• COND=((tcode,oper),EVEN/ONLY)
• COND=EVEN/ONLY (Executes job step even if a program ABENDs/only if an ABEND occurs)
Additional features in MVS
• Enhancement in TIME PARAMETER
• This statement is used in JCL for conditions instead of COND parameter.
//Name ELSE
Subscribe to:
Post Comments (Atom)
No comments
Post a Comment