Stephen Linkin Houston Community College 1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM...

19
1/31/07 © 2002 - Mike Murach & Associ ates, 2006 - HCC, IB M 1 Stephen Linkin Houston Community College Using JCL and JES To Manage Program Execution Chapter 5 Chapter 5

Transcript of Stephen Linkin Houston Community College 1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM...

1/31/07

© 2002 - Mike Murach & Associates, 2006 - HCC, IBM 1

Stephen LinkinHouston Community College

Using JCL and JES To Manage Program Execution

Chapter 5 Chapter 5

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

2

Objectives

Applied objectivesApplied objectives Code JOB parameters to influence job scheduling in the following Code JOB parameters to influence job scheduling in the following

ways:ways:a.a. specify the job’s classspecify the job’s classb.b. specify the job’s scheduling priorityspecify the job’s scheduling priorityc.c. hold the jobhold the jobd.d. scan the job for syntax errorsscan the job for syntax errors

Code JOB and EXEC parameters to:Code JOB and EXEC parameters to:a.a. limit the amount of storage available during limit the amount of storage available during

a job stepa job stepb.b. specify a job’s real storage requirementsspecify a job’s real storage requirements

Code JCL parameters to set the following processing Code JCL parameters to set the following processing limits:limits:

a.a. execution timeexecution timeb.b. SYSOUT print dataSYSOUT print data

Code DD statements to allocate the following Code DD statements to allocate the following execution-related data sets:execution-related data sets:

a.a. job libraryjob libraryb.b. step librarystep libraryc.c. dump data setdump data set

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

3

Objectives

Knowledge objectivesKnowledge objectives Describe the rules for coding JES2 or JES3 control statements.Describe the rules for coding JES2 or JES3 control statements. Name the JES2 statements you used Name the JES2 statements you used

(1) to specify a job’s scheduling priority(1) to specify a job’s scheduling priority(2) to limit the amount of SYSOUT output.(2) to limit the amount of SYSOUT output.

Name the JES3 statement used to control job processing options.Name the JES3 statement used to control job processing options. Describe the search sequence for a program named in an EXEC Describe the search sequence for a program named in an EXEC

statement when private libraries are included in the job stream.statement when private libraries are included in the job stream.

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

4

More Syntax of JOB Statement

The syntax of a JOB statementThe syntax of a JOB statement//jobname JOB [ accounting-information ] [ ,programmer-name ] [ ,MSGCLASS=class ] [ ,MSGLEVEL=(stmt,msg) ] [ ,NOTIFY=user-id ] [ ,ADDRSPC= {VIRT} ] {REAL} [ ,BYTES=(value[,action])] [ ,CARDS=(value[,action])] [ ,CLASS=jobclass ] [ ,LINES=(value[,action])] [ ,PAGES=(value[,action])] [ ,PRTY=priority ] [ ,REGION= {valueK} ] {valueM} [ ,TIME= {([minutes][,seconds])} ] {1440} {NOLIMIT} {MAXIMUM} [ ,TYPRUN= {COPY} ] {HOLD} {JCLHOLD} {SCAN}

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

5

More Syntax of EXEC Statement

//stepname EXEC PGM=program-name [ ,PARM=information ] [ ,ADDRSPC= {VIRT} ] {REAL} [ ,REGION= {valueK} ] {valueM} [ ,TIME= {([minutes][,seconds])} ] {1440} {NOLIMIT} {MAXIMUM} {0}

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

6

The Syntax for JES2/JES3

The syntax for JES2/JES3 control statementsThe syntax for JES2/JES3 control statementsidentifier operation [parameters]identifier operation [parameters]

Four differences between JES2/JES3 statements Four differences between JES2/JES3 statements and JCL statementsand JCL statements JES2/JES3 statements use a different identifier.JES2/JES3 statements use a different identifier. JES2/JES3 statements have no name field.JES2/JES3 statements have no name field. JES2/JES3 statements have different continuation rules.JES2/JES3 statements have different continuation rules. The system ignores JES2/JES3 statements in cataloged The system ignores JES2/JES3 statements in cataloged

or instream proceduresor instream procedures

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

7

Additional JES Statements

JES2 /*PRIORITY statementJES2 /*PRIORITY statement/*PRIORITY priority/*PRIORITY priority

JES2 /*JOBPARM statementJES2 /*JOBPARM statement/*JOBPARM [ ,BYTES=value ]/*JOBPARM [ ,BYTES=value ]

[ ,CARDS=value ] [ ,CARDS=value ] [ ,LINES=value ] [ ,LINES=value ] [ ,PAGES=value ] [ ,PAGES=value ] [ ,RESTART= {Y} { [ ,RESTART= {Y} {NN} ]} ] [ ,SYSAFF=(system[,IND]) ] [ ,SYSAFF=(system[,IND]) ]

//MM01RN JOB (36512),'CS MOORE',MSGCLASS=X,MSGLEVEL=(1,1)/*JOBPARM SYSAFF=MVSA//STEP1 EXEC PGM=SORT..

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

8Figure 5-04b

Other JES2 control statements

StatementStatement FunctionFunction/*$command-verb/*$command-verb Specifies JES2 operator commands. Must be placed |Specifies JES2 operator commands. Must be placed |

before the JOB statement.before the JOB statement./*MESSAGE/*MESSAGE Sends a message to the operator.Sends a message to the operator./*NETACCT/*NETACCT Specifies the job account number.Specifies the job account number./*NOTIFY/*NOTIFY Notifies the specified user when the job is completed Notifies the specified user when the job is completed

(same as the NOTIFY parameter on the JOB (same as the NOTIFY parameter on the JOB statement).statement).

/*OUTPUT/*OUTPUT Specifies SYSOUT processing options.Specifies SYSOUT processing options./*ROUTE/*ROUTE Routes the job for execution or printing to a specific Routes the job for execution or printing to a specific

JES2 node.JES2 node./*SETUP/*SETUP Instructs the operator to mount specified tape volumes Instructs the operator to mount specified tape volumes

prior to job execution.prior to job execution./*SIGNOFF/*SIGNOFF Ends a remote job session. May be placed anywhere in Ends a remote job session. May be placed anywhere in

the job stream.the job stream./*SIGNON/*SIGNON Begins a remote job entry session. Must be the first Begins a remote job entry session. Must be the first

statement in the job stream.statement in the job stream./*XEQ/*XEQ Routes the job to a specific JES2 node for execution.Routes the job to a specific JES2 node for execution./*XMIT/*XMIT Transmits data to another JES2 node.Transmits data to another JES2 node.

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

9

Other JES3 control statements

StatementStatement FunctionFunction//*DATASET//*DATASET Supplies data for an instream data set. Must be placedSupplies data for an instream data set. Must be placed

immediately before the first record of the instream data.immediately before the first record of the instream data.//*ENDDATASET//*ENDDATASET Indicates the end of an instream data set. Must be placedIndicates the end of an instream data set. Must be placed

immediately after the last record of the instream data.immediately after the last record of the instream data.//*ENDPROCESS//*ENDPROCESS Indicates the end of a series of //*PROCESS statements.Indicates the end of a series of //*PROCESS statements.//*FORMAT//*FORMAT Specifies options for SYSOUT data sets.Specifies options for SYSOUT data sets.//*NET//*NET Specifies dependencies between jobs.Specifies dependencies between jobs.//*NETACCT//*NETACCT Specifies job accounting information that will transmit Specifies job accounting information that will transmit

with a job to another node.with a job to another node.//*OPERATOR//*OPERATOR Sends a message to the operator.Sends a message to the operator.//**PAUSE//**PAUSE Pauses the input reader until the operator issues a Pauses the input reader until the operator issues a

*START operator command. Must be placed before the*START operator command. Must be placed before theJOB statement.JOB statement.

//*PROCESS//*PROCESS Controls JES3 job processing. An //*ENDPROCESSControls JES3 job processing. An //*ENDPROCESSstatement must follow any //*PROCESS statements.statement must follow any //*PROCESS statements.

//*ROUTE//*ROUTE Routes the job to another node in the network.Routes the job to another node in the network./*SIGNOFF/*SIGNOFF Ends a remote job session. May be placed anywhere inEnds a remote job session. May be placed anywhere in

the job stream.the job stream./*SIGNON/*SIGNON Begins a remote job entry session. Must be the firstBegins a remote job entry session. Must be the first

statement in the job stream.statement in the job stream.

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

10

Assign A Job Class

Two ways to assign a job classTwo ways to assign a job class Assigning a job class on a JOB statementAssigning a job class on a JOB statement

//MM01A JOB (36512),'B SYVERSON',MSGCLASS=X,MSGLEVEL=(1,1),//MM01A JOB (36512),'B SYVERSON',MSGCLASS=X,MSGLEVEL=(1,1),// // CLASS=FCLASS=F,NOTIFY=&SYSUID ,NOTIFY=&SYSUID

Assigning a job class with the CLASS parameter on a Assigning a job class with the CLASS parameter on a JES3 //*MAIN statementJES3 //*MAIN statement

//MM01A JOB (36512),'B SYVERSON',NOTIFY=&SYSUID//MM01A JOB (36512),'B SYVERSON',NOTIFY=&SYSUID//*MAIN CLASS=F//*MAIN CLASS=F

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

11

Scheduling Priority

Two ways to assign a scheduling priorityTwo ways to assign a scheduling priority Assigning a priority on a JOB statementAssigning a priority on a JOB statement

//MM01A JOB (36512),'A STEELMAN‘//MM01A JOB (36512),'A STEELMAN‘

// ,MSGCLASS=X, MSGLEVEL=(1,1),// ,MSGCLASS=X, MSGLEVEL=(1,1),

// CLASS=F// CLASS=F,PRTY=12,PRTY=12,NOTIFY=&SYSUID,NOTIFY=&SYSUID

Assigning a priority with the JES2 /*PRIORITY statementAssigning a priority with the JES2 /*PRIORITY statement/*PRIORITY 12/*PRIORITY 12

//MM01A JOB (36512),'A STEELMAN',NOTIFY=&SYSUID//MM01A JOB (36512),'A STEELMAN',NOTIFY=&SYSUID

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

12

The syntax for the TYPRUN parameter of the JOB The syntax for the TYPRUN parameter of the JOB statementstatement

TYPRUN= {COPY}TYPRUN= {COPY}{HOLD}{HOLD}{JCLHOLD}{JCLHOLD}{SCAN}{SCAN}

HOLDING JOBS

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

13

Four Ways To Hold A Job

Example 1Example 1 //MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1), //MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1),

// CLASS=A,// CLASS=A,TYPRUN=HOLDTYPRUN=HOLD,NOTIFY=&SYSUID,NOTIFY=&SYSUID Example 2 (JES2 only)Example 2 (JES2 only)

//MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1), //MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1), // CLASS=A,// CLASS=A,TYPRUN=JCLHOLDTYPRUN=JCLHOLD,NOTIFY=&SYSUID ,NOTIFY=&SYSUID

Example 3Example 3 //MM01A JOB (36512),'M MURACH',NOTIFY=&SYSUID,//MM01A JOB (36512),'M MURACH',NOTIFY=&SYSUID,CLASS=HCLASS=H

Example 4 (JES3 only)Example 4 (JES3 only) //MM01A JOB (36512),'M MURACH',NOTIFY=&SYSUID//MM01A JOB (36512),'M MURACH',NOTIFY=&SYSUID

//*MAIN HOLD=YES//*MAIN HOLD=YES How to scan a job for syntax errorsHow to scan a job for syntax errors

//MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1), //MM01A JOB (36512),'M MURACH',MSGCLASS=X,MSGLEVEL=(1,1), // CLASS=A,// CLASS=A,TYPRUN=SCAN,TYPRUN=SCAN,NOTIFY=&SYSUID NOTIFY=&SYSUID

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

14

Regions

The syntax for REGION parameter of JOB and The syntax for REGION parameter of JOB and EXEC statementsEXEC statements REGION= {valueK} {valueM}REGION= {valueK} {valueM}

A JOB specifying 4 meg of storage for each job A JOB specifying 4 meg of storage for each job stepstep //MM03A JOB (36512),'A PRINCE',//MM03A JOB (36512),'A PRINCE',REGION=4MREGION=4M

An EXEC statement specifying 256 k storage for An EXEC statement specifying 256 k storage for job stepsjob steps //STEP3 EXEC PGM=INV1000,//STEP3 EXEC PGM=INV1000,REGION=256KREGION=256K

The syntax for LREGION parameter in the JES3 The syntax for LREGION parameter in the JES3 //*MAIN statement//*MAIN statement LREGION=valueKLREGION=valueK//MM01A JOB (36512),'B MURACH',NOTIFY=MM01//MM01A JOB (36512),'B MURACH',NOTIFY=MM01

//*MAIN //*MAIN LREGION=120KLREGION=120K

ADDRSPC parameter requesting real storage for the jobADDRSPC parameter requesting real storage for the job

//MMO3A JOB (36512),'A PRINCE',REGION=4M,//MMO3A JOB (36512),'A PRINCE',REGION=4M,ADDRSPC=REALADDRSPC=REAL

ADDRSPC parameter that requests real storage for a job stepADDRSPC parameter that requests real storage for a job step

//STEP3 EXEC PGM=INV1000,//STEP3 EXEC PGM=INV1000,ADDRSPC=REALADDRSPC=REAL

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

15

Processing Limits

TIME parameter of JOB and EXEC statementsTIME parameter of JOB and EXEC statementsTIME= {([minutes][,seconds])}TIME= {([minutes][,seconds])}

{1440} {1440} {NOLIMIT} {NOLIMIT} {MAXIMUM} {MAXIMUM} {0} {0} (EXEC statement only)(EXEC statement only)

Uses the TIME parameter on JOB and EXEC Uses the TIME parameter on JOB and EXEC statementsstatements //MM03A JOB (36512),'LE MENENDEZ',TIME=5//MM03A JOB (36512),'LE MENENDEZ',TIME=5

//STEP1 EXEC PGM=VIDUPD1,//STEP1 EXEC PGM=VIDUPD1,TIME=3TIME=3..

//STEP2 EXEC PGM=VIDRPT1,//STEP2 EXEC PGM=VIDRPT1,TIME=3TIME=3..

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

16

SYSOUT Limits

SYSOUT parameters of JOB and JES3 //*MAIN SYSOUT parameters of JOB and JES3 //*MAIN statementsstatementsBYTES=(value[,action])BYTES=(value[,action])

CARDS=(value[,action])CARDS=(value[,action])LINES=(value[,action])LINES=(value[,action])PAGES=(value[,action])PAGES=(value[,action])

SYSOUT parameters of the JES2 /*JOBPARM SYSOUT parameters of the JES2 /*JOBPARM statementstatementBYTES=valueBYTES=value

CARDS=valueCARDS=valueLINES=valueLINES=valuePAGES=valuePAGES=value

//MM01A JOB (36512),'R MENENDEZ', // LINES=(200,WARNING)

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

17

Job step with no STEPLIB

Job step with STEPLIB

MMA.TEST.LOADLIB

MM01.TEST.LOADLIB

//JOBLIB DD

//STEPLIB DD

SYS1.LINKLIB

Standardsystem library

Installation-specificlibraries

Figure 5-13a

Allocating a JOB library//MM01E JOB (36512),'LE MENENDEZ',NOTIFY=MM01//JOBLIB DD DSNAME=MM.TEST.LOADLIB,DISP=SHR//STEP1 EXEC PGM=IEBGENER..//STEP2 EXEC PGM=ORD2200A.

Allocating a STEP library//MM01F JOB (36512),'LE MENENDEZ',NOTIFY=MM01//STEP1 EXEC PGM=IEBGENER..//STEP2 EXEC PGM=ORD2200A//STEPLIB DD DSNAME=MM01.TEST.LOADLIB,DISP=SHR.

Searching Sequence for Private Libraries

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

18

ABENDS

This produces a formatted dump if STEP1 This produces a formatted dump if STEP1 abendsabends

//MM01RN JOB (36512),'J TAYLOR',MSGCLASS=X,MSGLEVEL=(1,1), //MM01RN JOB (36512),'J TAYLOR',MSGCLASS=X,MSGLEVEL=(1,1), // CLASS=A,NOTIFY=&SYSUID // CLASS=A,NOTIFY=&SYSUID //STEP1 EXEC PGM=INV2300 //STEP1 EXEC PGM=INV2300 //STEPLIB DD DSN=MM01.TEST.LOADLIB,DISP=SHR //STEPLIB DD DSN=MM01.TEST.LOADLIB,DISP=SHR //INVMSTS DD DSN=MM01.INVMSTS.DATA,DISP=SHR //INVMSTS DD DSN=MM01.INVMSTS.DATA,DISP=SHR //RCTTRAN DD DSN=MM01.RCTTRAN.DATA,DISP=SHR //RCTTRAN DD DSN=MM01.RCTTRAN.DATA,DISP=SHR //RCTERR DD DSN=MM01.DCMERR.DATA,DISP=(NEW,CATLG,DELETE), //RCTERR DD DSN=MM01.DCMERR.DATA,DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,VOL=SER=LIB788, // UNIT=SYSDA,VOL=SER=LIB788, // SPACE=(TRK,(1,1)), // SPACE=(TRK,(1,1)), // DCB=(DSORG=PS,RECFM=FB,LRECL=23) // DCB=(DSORG=PS,RECFM=FB,LRECL=23) //SYSOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=*//SYSUDUMP DD SYSOUT=*

1/31/07 © 2002 - Mike Murach & Associates, 2006 - HCC, IBM

19

End Presentation