0% found this document useful (0 votes)
143 views

z/OS MVS JCL Intermediate

jcl

Uploaded by

asim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

z/OS MVS JCL Intermediate

jcl

Uploaded by

asim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

z/OS MVS JCL Intermediate

Copyright IBM Corp., 2000, 2004. All rights reserved.

z/OS MVS JCL Intermediate

UNIT

Determining the Effective JCL


Topics:
Using a Job Log
Identify the JCL in Effect
Interpreting Error Messages
Correcting JCL Errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 2

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL
Unit Introduction
This unit focuses on identifying and correcting common JCL errors that can occur when a procedure is used.
This unit discusses how to identify an effective JCL (the actual JCL resulting from the use of a procedure) in a
message log.
This unit also explains how to look at system messages, error messages and the effective JCL to isolate and
correct common JCL errors.

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 3

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL
Unit Objectives
At the end of this unit, you will be able to:

Identify the JCL in effect at job execution time by


examining a job log

Specify the parts of a job log that can help you analyze
the effective JCL

Identify and correct common JCL errors that can occur


when a procedure is used

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 4

z/OS MVS JCL Intermediate

UNIT

Determining the Effective JCL


Topics:
Using a Job Log
Identify the JCL in Effect
Interpreting Error Messages
Correcting JCL Errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 5

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Topic Objectives
At the end of this topic, you will be able to:

Identify an effective JCL

Describe a job log and specify its contents

Explain how to request a JCL listing

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 6

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Effective JCL
What is an effective JCL?
When a procedure is invoked, the system
combines both the submitted JCL and the JCL
that is stored with the procedure. The resulting
JCL is called the effective JCL.
Effective JCL is the JCL in effect at the time of job
execution.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 7

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Examining Effective JCL


An effective JCL is examined for the following reasons:

Concepts

To ensure that the effective JCL satisfies all the processing requirements, particularly if it contains a
number of overrides and additions

To find the source of the problem if a job is not successfully executed

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 8

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Job Log
An effective JCL is checked by examining the job
log.

System Messages:

JES2 JOB LOG--SYSTEM EPP1 - NODE SPC


In addition to the listing of effective JCL used
during job execution, a job log can also contain
the following:

Concepts

09.11.58 JOB0355 TEFC452I - JOB NOT RUNJCL ERROR


-----JES2 JOB STATISTICS-----

System messages

Detailed Error Message:

Detailed error messages for specific


statements of effective JCL

STMT NO. MESSAGE


3
IEFC630I UNIDENTIFIED KEYWORD
PATM
Resource Allocation Messages:

Resource-allocation/job-step
termination-status messages

IEF2371 4BB ALLOCATED TO DD1

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 9

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Requesting a JCL Listing


A programmer can request that procedure
statements be listed in a job log by coding the
value
1 as the first MSGLEVEL subparameter of the JOB
statement.

//

JOB

...MSGLEVEL=1

Consider the TRANSACT procedure discussed in


the first topic of this unit. The JCL statements in the
procedure would be listed on the job log for
MYJOB.

//MYJOB
//
//JSTEP1

Concepts

JOB
EXEC

377-44-1247,
D.ROSE,MSGLEVEL=(1)
TRANSACT

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 10

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Are We on Track?

Enter the subparameter that you would code on a job statement to obtain a listing of procedure
statements, if they are not included by default:

//MYJOB

Review

JOB

123,D.GREEN______________________________

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 11

z/OS MVS JCL Intermediate


Unit: Using Special DD Statements

Topic: Using Backward Reference

Glossary
MSGLEVEL

Glossary

A JOB statement parameter that controls the printing of JCL statements


and allocation messages.

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 12

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Using a Job Log

Topic Summary
Now that you have completed this topic, you should be able to:

Summary

Identify an effective JCL

Describe a job log and specify its contents

Explain how to request a JCL listing

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 13

z/OS MVS JCL Intermediate

UNIT

Determining the Effective JCL


Topics:
Using a Job Log
Identify the JCL in Effect
Interpreting Error Messages
Correcting JCL Errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 14

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Topic Objectives
At the end of this topic, you will be able to:
Verify the job log listing
Identify special notations in a job log listing
Identify the sequence of JCL statements in effect
Identify JCL that invokes a cataloged procedure
Identify and analyze an effective JCL in a job log

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 15

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Job Log Listing


The listing of a job log can be used to verify if the
resulting JCL for the job is what is required.
The job log is also useful to verify the JCL and to
distinguish between:
JCL statements submitted
Statements stored in the procedure
JCL in effect
In a job log listing, special notations in columns 1, 2,
and 3 distinguish between different categories of
statements as shown on the next slide.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 16

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Notations in a Job Log Listing


Notations in Columns 1,
2, and 3

Statement identified

Cataloged
Procedure

In-stream
Procedure

//

//

Statements you submit with the job, including in-stream procedure definitions
(if applicable) and any alterations to DD statements.

XX

++

A statement in a procedure definition that is used during a job execution

X/

+/

A DD statement in a procedure definition that you have overridden

XX*

++

A statement in a procedure definition, other than a comment statement, that


the system considers to be a comment

***

***

A comment or job entry subsystem control statement

The table above illustrates the notations used on a job log to identify JCL statements.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 17

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Are We on Track?

Match the job log notations below with the kinds of statements they identify.

Review

1. +/

A. JCL statements you submit

2. XX

B. A DD statement in an in-stream procedure that is overridden

3. //

C. A comment or control statement

4. ***

D. A statement from a cataloged procedure that is used

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 18

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

JCL in Effect In-Stream Procedure


The JCL shown on the right illustrates how to
identify the JCL in effect at job execution time
when using an in-stream procedure.
In the example, the JCL is for a job named
LA$TEST2 that invokes an in-stream procedure
named TRANSACT. The JCL for LA$TEST2
comprises the following:
The JOBLIB statement identifies the
library storing the programs to be
executed
The TRANSACT procedure definition
appears between the PROC and PEND
statements
The final statement executes the
procedure

Concepts

//LA$TEST2
//
//JOBLIB
//
//TRANSACT
//PSTEP1
//DD1
//
//DD2
//
//DD3
//DD4
//
//
//PSTEP2
//DD5
//
//DD6
//JSTEP

JOB 31SPC090156W,ROSE,
CLASS=B
DD DSN=TSOCHIS.TESTJCL.LOAD,
DISP=SHR
PROC
EXEC
PGM=PROG1
DD DSN=TSOCHIS.INTRAN,
DISP=SHR
DD DSN=TSOCHIS.MASTER,
DISP=SHR
DD SYSOUT=A
DD DSN=&&VALID,UNIT=SYSDA,
DISP=(NEW,PASS),
SPACE=(TRK,(1,1))
EXEC PGM=PROG2
DD
DSN=&&VALID,
DISP=(OLD,DELETE)
DD
SYSOUT=A,PEND
EXEC
TRANSACT

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 19

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

JCL Statements in Effect


1. //LA$TEST2
2. //JOBLIB
//TRANSACT
//PSTEP1
//DD1
//DD2
//DD3
//DD4
//PSTEP2
//DD5
//DD6
//
3. //JSTEP
4. ++TRANSACT
5. ++ //PSTEP1
6. ++//DD1
7. ++//DD2
8. ++//DD3
9. ++//DD4
10. ++//PSTEP2
11. ++//DD5
12. ++//DD6

JOB
DD
PROC
EXEC
DD
DD
DD
DD
EXEC
DD
DD
PEND
EXEC
PROC
EXEC
DD
DD
DD
DD
EXEC
DD
DD

(31SPCO3090156W),ROSE,CLASS=B
DSN=TSOCHIS.TESTJCL.LOAD,DISP=SHR
PGM=PROG1
DSN=TSOCHIS.INTRAN,DISP=SHR
DSN=TSOCHIS.MASTER,DISP=SHR
SYSOUT=A
DSN=&&VALID,UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(TRK,(1,1))
PGM=PROG2
DSN=&&VALID,DISP=(OLD,DELETE)
SYSOUT=A
TRANSACT
PGM=PROG1
DSN=TSOCHIS.INTRAN,DISP=SHR
DSN=TSOCHIS.MASTER,DISP=SHR
SYSOUT=A
DSN=&&VALID,UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(TRK,(1,1))
PGM=PROG2
DSN=&&VALID,DISP=(OLD,DELETE)
SYSOUT=A

The JCL portion of the job log for LA$TEST2 is shown above.
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 20

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Are We on Track?

Review the effective JCL for job LA$TEST2, on the previous page. The // notation identifies the
JCL statements that are submitted with the job that invokes the TRANSACT procedure. Which of
the following are included?
A. JOB statement
B. JOBLIB DD statement
C. DD override statement
D. TRANSACT procedure definition

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 21

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

JCL in Effect Cataloged Procedure


An example of JCL that invokes a cataloged
procedure named COBUCL is shown on the right.
STEP1 of COBUCL compiles a COBOL program.
There are addition and override statements for
STEP1 as follows:
COB.SYSIN is an addition DD statement
that identifies the source module to be
compiled

//LA$MYJOB JOB 31SPCO3090156W,


//
ROSE,CLASS=B
//JSTEP1
EXEC COBUCL
//COB.SYSIN DD
//
DSN=TESTJCL.CNTL(PROG1),
//
DISP=SHR
//LKED.SYSLMOD DD
//
DSN=TESTJCL.LOAD(PROG1),
//
DISP=SHR,UNIT=3390-1,
//
VOL=SER=EDPVT2

LKED.SYSLMOD is an override DD
statement that specifies the data set and
member name

Continued
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 22

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

JCL in Effect Cataloged Procedure (contd)


The example of JCL that invokes a cataloged
procedure named COBUCL shown on the right,
where STEP2 link edits the resulting COBOL
object program.
There are addition and override statements for
STEP2 as follows:
COB.SYSIN is an addition DD statement
that identifies the source module to be
compiled

//JSTEP2 EXEC
COBUCL
//COB.SYSIN
DD
//
DSN=TESTJCL.CNTL(PROG2),
//
DISP=SHR
//LKED.SYSLMOD DD
//
DSN=TESTJCL.LOAD(PROG2),
//
DISP=SHR

LKED.SYSLMOD is an override DD
statement that specifies the data set and
member name

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 23

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Effective JCL in a Job Log


1. //LA$MYJOB
JOB
3ISPCO3090156W,ROSE,MSGCLASS=T,CLASS=T,MSGLEVEL(1,1)
2. //JSTEP1
EXEC
COBUCL
3. XXCOBUCL
PROC
4. XXCOB
EXEC
PGM=IKFCBL00
5. XXSYSPRINT
DD
SYSOUT=*
6. XXSYSUT1
DD
UNIT=SYSDA,SPACE=(CYL,(1,1))
7. XXSYSUT2
DD
UNIT=SYSDA,SPACE=(CYL,(1,1))
8. XXSYSUT3
DD
UNIT=SYSDA,SPACE=(CYL,(1,1))
9. XXSYSUT4
DD
UNIT=SYSDA,SPACE=(CYL,(1,1))
10. XXSYSLIN
DD
DSN=**LOADSET,UNIT=SYSDA,
XX
DISP=(MOD,PASS),SPACE=9TRK,93,300,DCB=BLKSIZE=800
11.//COB.SYSIN
DD
DSN=TESTJCL.CNTL(PROG1),DISP=SHR
12.XXLKED
EXEC
PGM=IEW,PARM=LIST,MAP,COND=(5,LT,COB),
. . .
15.//LKED.SYSLMODDD
DSN=TESTJCL.LOAD(PROG1),UNIT=SYDA,DISP=SHR
X/SYSLMOD
DD
DSN=&&GOSET,DISP=(,PASS),NIT=SYSDA,SPACE=(CYL,(1,1,1,)0
A portion of the effective JCL in the job log for LA$MYJOB is shown above. The JCL statements that are
submitted are identified by the // notation. The statements from the procedure definition that are used are
identified by the XX notation.
The addition DD statement for procedure step COB is statement 11. The override statement for procedure
step LKED (statement 15) appears at the point where the DD statement to be overridden appears. The
statement to be overridden is preceded by the X/ notation.
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 24

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Are We on Track?

Review the effective JCL in job log for LA$MYJOB, on the previous slide. Notice that the system
merges the cataloged procedure statements into the job stream at the appropriate places. Order
the following statements to reflect the sequence of effective JCL in the example.
A. Statements of procedure step COB
B. EXEC statement to invoke the procedure
C. Addition statement for COB
D. JOB statement
E. DD statement that is overridden
F. Statement of procedure step LKED
G. Override statement for procedure step LKED

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 25

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Glossary
JOBLIB

Glossary

A special DD statement that identifies in a private library, where


programs reside.

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 26

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Topic Summary
Now that you have completed this topic, you should be able to:

Summary

Verify the job log listing

Identify special notations in a job log listing

Identify the sequence of JCL statements in effect

Identify JCL that invokes a cataloged procedure

Identify and analyze an effective JCL in a job log

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 27

z/OS MVS JCL Intermediate

UNIT

Determining the Effective JCL


Topics:
Using a Job Log
Identify the JCL in Effect
Interpreting Error Messages
Correcting JCL Errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 28

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Topic Objectives
At the end of this topic, you will be able to:

Isolate JCL statements causing error messages

Examine a system message

Recognize the statement number associated with an


error message

Identify and interpret error messages

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 29

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

JCL Statements Causing Error Messages


Information provided in the job log can also be used to isolate JCL statements causing error messages. The
errors can be corrected in the EXEC and DD statements that are submitted when you invoke the procedure.
To isolate and correct JCL errors, you may have to examine the following portions of the job log, illustrated in
the next slide:

The system messages

The listing of effective JCL

The detailed error messages for specific statements

The resource-allocation messages for specific statements

Continued
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 30

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Identifying the JCL in Effect

Job Log
1. //LA$TEST2
2. //JOBLIB
//TRANSACT
//PSTEP1
//DD1
//DD2
//DD3
//DD4
//PSTEP2
//DD5
//DD6
//
3. //JSTEP
4. ++TRANSACT
5. ++ //PSTEP1
6. ++//DD1
7. ++//DD2
8. ++//DD3
9. ++//DD4
10. ++//PSTEP2
11. ++//DD5
12. ++//DD6

JOB
DD
PROC
EXEC
DD
DD
DD
DD
EXEC
DD
DD
PEND
EXEC
PROC
EXEC
DD
DD
DD
DD
EXEC
DD
DD

(31SPCO3090156W),ROSE,CLASS=B
DSN=TSOCHIS.TESTJCL.LOAD,DISP=SHR
PGM=PROG1
DSN=TSOCHIS.INTRAN,DISP=SHR
DSN=TSOCHIS.MASTER,DISP=SHR
SYSOUT=A
DSN=&&VALID,UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(TRK,(1,1))
PGM=PROG2
DSN=&&VALID,DISP=(OLD,DELETE)
SYSOUT=A
TRANSACT
PGM=PROG1
DSN=TSOCHIS.INTRAN,DISP=SHR
DSN=TSOCHIS.MASTER,DISP=SHR
SYSOUT=A
DSN=&&VALID,UNIT=SYSDA,DISP=(NEW,PASS),SPACE=(TRK,(1,1))
PGM=PROG2
DSN=&&VALID,DISP=(OLD,DELETE)
SYSOUT=A

The JCL portion of the job log is shown above.


Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 31

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

JCL Error System Message

JES2 JOB LOG SYSTEM EPP1 NODE SPC


09.11.58 JOB0355 TEFC452I JOB NOT RUN JCL ERROR
----JES2 JOB STATISTICS ---17 CARDS
READ
42 SYSOUT
PUNCH
RECORDS
0 SYSOUT
PUNCH
KBYTES
0.00 MINUTES
EXECUTION
TIME

TIME

An example of a system message is shown above. System messages appear at the beginning of a job log.
They give information such as time of the job, the job number assigned internally, and job statistics.
If the job is not run because of a JCL error, a system message indicating the error will appear in this part of
the job log.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 32

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

JCL Error Messages


STMT NO. MESSAGE
19 IEF6861 DDNAME REFERRED
DDNAME KEYWORD IN PRIOR
NOT RESOLVED
35 IEF6861 DDNAME REFERRED
DDNAME KEYWORD IN PRIOR
NOT RESOLVED
------------------IEF2371 DMY ALLOCATED TO

TO ON
STEP WAS
TO ON
STEP WAS

The example above shows detailed error messages for LA$TEST. These types of messages appear at the
end of the job log.
The two warning messages that appear here to draw the users attention to unresolved DDNAME keyword
operands are JCL statements 19 and 35. In this case, the unresolved operands do not prevent the job from
executing. A later resource allocation statement indicates that the data set was assigned dummy status.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 33

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Are We on Track?

Match the items from a job log with the kind of information they can give you about a procedure:

Review

1. Resource allocation messages

A. Whether or not a job has run

2. Effective JCL

B. A specific problem and the statement in which it


may appear

3. Detailed Error Messages

C. The JCL the system has executed

4. System Messages

D. How system resources are used

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 34

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

JCL Error Statement Number


Error Message:
19 IEF6861 DDNAME REFERRED TO ON
DDNAME KEYWORD IN PRIOR STEP WAS
NOT RESOLVED
Effective JCL:
18XX

DD

19//JSTEP2

DDNAME=SYSIN
EXEC

COBUCL

Sometimes the statement number associated with an error message is not the actual statement to which the
message applies. In this example, statement 19 is associated with the error message. However, the error
actually occurs in statement 18 as shown in the job log.
As the system interpreted the JCL for this job, it expected statement 19 to be a DD statement to assign a value
to the DDNAME operand in statement 18. When the system encountered an EXEC statement instead, it
created a message for statement 19. However, the reason for the diagnostic actually appears in statement 18.
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 35

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

System Message An Example

JES2
SPC
16.31.28
16.31.28
16.31.29
16.31.29

JOBO3361
JOBO3361
JOBO3361
JOBO3361

LASTEST9
IEF4581
IEC1301
LASTEST9

JOB LOG==SYSTEM EPPIMODE

STARTEDINIT 37CLASSTSYS EPPI


LASTEST9 STARTED
DD2
DD STATEMENT MISSING
ENDED

As another example of interpreting error messages, examine the system messages for a job named
LASTEST9 as shown above to answer the question on the next slide.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 36

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Are We on Track?

In the example on the previous slide, which one of the following problems is identified by the
system messages:
A. The job did not execute
B. DD statement DD2 is missing
C. There was a JCL error
D. An operand was unresolved

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 37

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Effective JCL An Example


Examine the JCL listing for LASTEST9 on the
right. Note that the procedure definition does not
include a DD statement named DD2.
However, a later addition statement (statement 9)
refers to a data set named DDIN in PSTEP1.

Concepts

Effective JCL:
1.//LASTEST9 JOB 12345,ROSE,CLASS=B
2.//JOBLIB DD DSN=TEST.JCL,DISP=SHR
//TRANSACT PROC
//PSTEP1 EXEC PROG=PROG1
//DD1 DD
DSN=INTRAN,DISP=SHR
//DD3 DD SYSOUT=A
. . .
9.//PSTEP1.DDIN DD DSN=MASTER,
//
DISP=SHR

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 38

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Are We on Track?

Refer to the effective JCL for LASTEST9 on the previous slide. Based on this JCL, which of the
following do you think is the likely cause of the error?
A. An incorrectly sequenced addition statement
B. An invalid name for an addition statement (DDIN, not DD2)
C. An incorrectly sequenced override statement

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 39

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Glossary
Unresolved

Glossary

Not assigned a value at procedure execution.

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 40

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Interpreting Error Messages

Topic Summary
Now that you have completed this topic, you should be able to:

Summary

Isolate JCL statements causing error messages

Examine a system message

Recognize the statement number associated with an


error message

Identify and interpret error messages

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 41

z/OS MVS JCL Intermediate

UNIT

Determining the Effective JCL


Topics:
Using a Job Log
Identify the JCL in Effect
Interpreting Error Messages
Correcting JCL Errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 42

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Topic Objectives
At the end of this topic, you will be able to:

Track the source of JCL errors

Identify common JCL errors

Correct JCL errors

Introduction

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 43

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Common JCL Errors


It can be helpful to know the way the system interprets JCL, while tracking the source of JCL errors. The
actual cause of the error may differ from the cause identified in a detailed error message.
Common JCL errors made when invoking procedures are:

Concepts

Specifying EXEC statement modifications in an incorrect sequence

Misspelling keyword parameters

Specifying override and addition DD statements in an incorrect sequence

Specifying an invalid name for an override or addition DD statements

Violating JCL syntax rules

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 44

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

EXEC Statement Modifications

09.11.58 JOB0355 TEFC452I JOB NOT RUN JCL ERROR


----JES2 JOB STATISTICS ---17 CARDS
READ
42 SYSOUT
PUNCH RECORDS
0 SYSOUT
PUNCH KBYTES
0.00 MINUTES
EXECUTION TIME
-------------------------------------------------------STMT.NO.
MESSAGE
3
IEFC6111
OVERRIDDEN STEP NOT FOUND IN PROCEDURE

A common procedure usage error is EXEC statement modifications that are not in correct sequence, that is,
not in procedure step sequence. The messages below indicate the kind of system and error message that
might result:

The system messages listed at the beginning of the job log indicate that the job did not execute
because of a JCL error.
The detailed error message at the end of the job indicates that the step to be overridden was not
found in the procedure. The offending statement is statement number 3 of effective JCL.
Continued

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 45

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

EXEC Statement Modifications An Example


An example of the statement of effective JCL
listing is on the right. The EXEC statement coded
to invoke the procedure contains an error.
The TIME parameter addition for the PSTEP2
EXEC statement of the procedure is specified
before the PARM parameter addition for the
PSTEP1 EXEC statement. The modifications are
not specified in procedure step sequence.

Concepts

3.//JSTEP EXEC
//
//

TRANSACT,
TIME.PSTEP2=1,
PARM.PSTEP1=NOCHECK

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 46

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Interpreting the JCL


How does the system interpret the JCL?
When interpreting the JCL for this job, the system
scans the procedure step sequence. It passes
through PSTEP1, then adds the TIME parameter
to PSTEP2.

3.//JSTEP EXEC
//
//

TRANSACT,
TIME.PSTEP2=1,
PARM.PSTEP1=NOCHECK

When it encounters the PARM parameter


addition, it cannot find a procedure step named
PSTEP1 that follows PSTEP2. It therefore issues
the diagnostic that the step to be overridden
cannot be found in the procedure.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 47

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Are We on Track?

Review the statement used to invoke the TRANSACT procedure in the previous example:
3. //JSTEP

EXEC

TRANSACT,TIME.PSTEP2=1,PARM.PSTEP1=NOCHECK

Code a correct JCL statement to invoke the procedure with the specified EXEC statement additions.
//JSTEP

Review

EXEC

TRANSACT,__________________

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 48

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Misspelling of Keyword Operands


----JES2 JOB LOG SYSTEM EPP1 NODE SPC
10.06.51 JOB02702 IEFC452I LA$TEST5 JOB NOT RUN JCL ERROR
---JES2 JOB STATITICS--20 CARDS
READ
34 SYSOUT
PRINT RECORDS
0 SYSOUT
PUNCH RECORDS
2 SYSOUT
SPOOL KBYTES
0.00 MINUTES
EXECUTION TIME
STMT NO. MESSAGE
3 IEFC630I UNIDENTIFIED KEYWORD PATM
Another common JCL error is misspelling of keyword operands on the EXEC or DD statements. The parts of
a job log for an in-stream procedure named TRANSACT is shown above. The following information is
provided in the job log:

Concepts

The system messages listed at the beginning of the job log indicate that the job did not execute
because of a JCL error.
The detailed message at the end of the job indicates an unidentified keyword. The offending
statement is statement number 3 of the effective JCL, where PARM is spelt as PATM.
Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 49

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Are We on Track?
Examine statement number 3 of the effective JCL listing. Identify the error in the EXEC statement
coded to invoke the procedure.

3. //JSTEP
//

EXEC
TRANSACT
PARM.PSTEP1=CHECK

Code a statement to correct the error.

//JSTEP EXEC ___________________

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 50

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Sequence of DD Statements
Improper sequence of override and addition DD statements is another common JCL error. They can be more
difficult to diagnose than those for EXEC statements.
The specification of an addition DD statement before an override DD statement is a particularly difficult error
to isolate. If both types of DD statement are required for the same procedure step, the system does not
recognize this as an error. The program executes without detailed error messages. However, the error is
reflected in the output of the program, which may be based on incorrect data.
Sequencing rules for coding override and addition DD statements within a procedure step is as follows:
1. Specify all override DD statements for a procedure step in same order as in the procedure.
2. Specify any addition DD statements for that step.

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 51

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Sequence of DD Statements An Example


As an example of the effects of incorrect
sequencing, consider the TRANSACT procedure
definition, the data set INTRAN is related to DD1.
MASTER

//DD1

DD

DSN=INTRAN,DISP=SHR

The user intends to invoke PSTEP1 of the


procedure using a data set named NEWTRAN,
rather than INTRAN. However, the user incorrectly
codes an override statement for PSTEP1 after a
valid addition statement.

3. //JSTEP
EXEC TRANSACT,
//
PARM.PSTEP1=CHECK
9. //PSTEP1.DD2 DD DSN=MASTER,
//
DISP=SHR
10.//PSTEP1.DD1 DD
//
DSN=NEWTRAN,DISP=SHR

INTRAN

NEWTRAN

(INTENDED OVERRIDE)
Continued

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 52

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Sequence of DD Statements An Example (contd)


The job executes successfully from the systems
viewpoint. There are no detailed error messages
in the job log. However, the program invoked in
PSTEP1 executes using data from the data set
related to DD1 in the procedure definition
(INTRAN), rather than the data from NEWTRAN.

MASTER

The system treats statement 10 as another


addition statement, because it is specified after
rather than before, a previous valid addition
statement.

10
01

INTRAN

(WRONG OVERRIDE)

NEWTRAN

10
01

(INTENDED OVERRIDE)
INCORRECT OUTPUT
Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 53

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Effective JCL Job Log


The effective JCL portion of the job log shown on
the right reinforces the conclusion in the example.
The DD1 DD statement (statement number 6)
was not overridden. The +/ or X/ notations
precede statements that are overridden. That is,
the data set name associated with DD1 is still
INTRAN.

1.//LASTEST
2.//JOBLIB
//
//TRANSACT
//PSTEP1
//DD1 DD

JOB...ROSE,CLASS=B
DD
DSN=TESTJECL,
DISP=SHR
PROC
EXEC
PGM=PROG1
DSN=INTRAN,DISP=SHR

-------3.//JSTEP
EXEC
TRANSACT,
//
PARM.PSTEP1=CHECK
4.++TRANSACT
PROC
5.++PSTEP1
EXEC
PGM=PROG1
6.//PSTEP1.DD1 DD
DSN=NEWTRAN,
//
DISP=SHR
++DD1
DD
DSN=INTRAN,DISP=SHR

Concepts

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 54

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Are We on Track?
Review the override statements that the user coded.

9. //PSTEP1.DD1 DD
//
10.//PSTEP1.DD2 DD
//

DSN=NEWTRAN,
DISP=SHR
DSN=MASTER,
DISP=SHR

Code the override statement to correct the error in the example shown above.

//PSTEP1________________________

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 55

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Are We on Track?
Review the override statements that the user coded.

9. //PSTEP1.DD1 DD
//
10.//PSTEP1.DD2 DD
//

DSN=NEWTRAN,
DISP=SHR
DSN=MASTER,
DISP=SHR

Code the addition statement to correct the error in the example shown above.

//PSTEP1.DD1 DD DSN=NEWTRAN,DISP=SHR
//PSTEP1________________________

Review

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 56

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL

Topic: Correcting JCL Errors

Topic Summary
Now that you have completed this topic, you should be able to:

Summary

Track the source of JCL errors

Identify common JCL errors

Correct JCL errors

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 57

z/OS MVS JCL Intermediate


Unit: Determining the Effective JCL
Unit Summary
Now that you have completed this unit, you should be able to:

Summary

Identify the JCL in effect at job execution time by


examining a job log

Specify the parts of a job log that can help you analyze
the effective JCL

Identify and correct common JCL errors that can occur


when a procedure is used

Summary

Copyright IBM Corp., 2000, 2004. All rights reserved.

Page 58

You might also like