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

MF JCLAdvancedFeatures Slides

MF_JCLAdvancedFeatures_Slides

Uploaded by

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

MF JCLAdvancedFeatures Slides

MF_JCLAdvancedFeatures_Slides

Uploaded by

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

Usage Guidelines

Do not forward this document to any non-Infosys mail ID.


Forwarding this document to a non-Infosys mail ID may
lead to disciplinary action against you, including
termination of employment.

Contents of this material cannot be used in any other


internal or external document without
© Infosys explicit
Technologies Ltd. permission
from E&R@infosys.com.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 1
anytime, anywhere!
JCL Advanced Features
Education & Research
“© 2010-2011 Infosys Limited, Bangalore, India. All rights reserved. Infosys believes the information in this document is accurate as of its publication
date; such information is subject to change without notice. Infosys acknowledges the proprietary rights of other companies to the trademarks,
product names and such other intellectual property rights mentioned in this document. Except as expressly permitted, neither this document nor any
part of it may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, printing, photocopying,
recording or otherwise, without the prior permission of Infosys Limited and/or any named intellectual property rights holders under this document.”

ER/CORP/CRS/OS86/003 Confidential © 2010 - 2011, Infosys Ltd.

JCL Advanced Features - Notes


Hello and Welcome! JCL Advanced Features in an advanced level mainframe
programming course. This course is exclusively designed for Level 400 Programming
Certification as a part of Education & Research.

2
Confidential Information

• This Document is confidential to Infosys Limited. This document contains information and data that Infosys
considers confidential and proprietary (“Confidential Information”).
• Confidential Information includes, but is not limited to, the following:
– Corporate and Infrastructure information about Infosys;
– Infosys’ project management and quality processes;
– Project experiences provided included as illustrative case studies.
• Any disclosure of Confidential Information to, or use of it by a third party, will be damaging to Infosys.
• Ownership of all Infosys Confidential Information, no matter in what media it resides, remains with Infosys.
• Confidential information in this document shall not be disclosed, duplicated or used – in whole or in part – for
any purpose without specific written permission of an authorized representative of Infosys.
• This document also contains third party confidential and proprietary information. Such third party information
has been included by Infosys after receiving due written permissions and authorizations from the party/ies.
Such third party confidential and proprietary information shall not be disclosed, duplicated or used – in whole
© Infosys
or in part – for any purpose without specific written Technologies
permission Ltd. representative of Infosys.
of an authorized

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 3
anytime, anywhere!
Course Objectives(1 of 2)

• To introduce more parameters on DD statement

• To introduce Storage Management Subsystem

• To introduce JES2 and JES3 subsystems and System


Display and Search Facility© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 4
anytime, anywhere!

4
Course Objectives(2 of 2)

• To introduce other ways of submitting jobs

• To introduce JCL behind Z/OS sub systems

• To introduce miscellaneous features in JCL


© Infosys Technologies Ltd.

• On completion of this course, one would be able to


understand more parameters on DD statement, SMS,
JES2 and JES3 subsystems and miscellaneous features.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 5
anytime, anywhere!

5
Pre-requisites
• Z/OS Fundamentals
• JCL Fundamentals
• Knowledge of COBOL, REXX

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 6
anytime, anywhere!
Course Plan
• To introduce
– DD statement parameter
– Storage Management Subsystem
– JES2 and JES3 subsystems and System Display and Search
Facility
– Other ways of submitting jobs
– JCL behind Z/OS sub systems
© Infosys Technologies Ltd.

– Miscellaneous features in JCL

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 7
anytime, anywhere!

7
DD statement parameters

• SYSOUT
• OUTPUT DD
• SEGMENT
• RETPD
• SPACE
• OUTLIM © Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 8
anytime, anywhere!

DD statement parameters – Notes


The additional parameters of DD statement to be discussed are:
SYSOUT
OUTPUT DD
SEGMENT
RETPD
SPACE
OUTLIM
SYSOUT parameter for DD statement

• SYSOUT parameter is coded to identify the dataset as a


system output data set
• Should not be used for a SMS managed data set
assigned with a data class
• It can also assign the system output data set to an output
class
© Infosys Technologies Ltd.
• Syntax:

SYSOUT=(class[,writer] [, {form-name,code-name}] )

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 9
anytime, anywhere!

SYSOUT parameter for DD statement – Notes


The SYSOUT parameter is used to route the output to a printer or system output data set.
The class can be any alphanumeric (A to Z, 0 to 9) character or the asterisk (*). The
definition of output classes is installation dependent.
The following are the options other than class:
1.To request an external writer to process the SYSOUT data set rather than JES. An
external writer is an IBM- or installation-written program.
2.To identify the forms on which the data set is to be printed or punched.
3.To refers to a JES2 /*OUTPUT statement for processing parameters.

9
SYSOUT parameter – Examples

Example 1
//ERXXXXXJ JOB ,,NOTIFY=&SYSUID
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//
Example 2
© Infosys Technologies Ltd.
//ERXXXXXJ JOB ,,NOTIFY=&SYSUID
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=A
//
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 10
anytime, anywhere!

SYSOUT parameter – examples – Notes


In Example1 SYSOUT=* is coded to specify the same class as in the JOB statement
MSGCLASS. In Example2 SYSOUT=A is coded to specify the class as A.
The following are the order of processing options for SYSOUT data set:
1.The options specified on this SYSOUT DD statement.
2.The options given in the referenced OUTPUT JCL statement.
3.The options coded on a referenced JES2 /*OUTPUT statement or on a JES3 //*FORMAT
statement.
4.The default options specific to output class coded.

Note: OUTPUT JCL statement and JES2/JES3 statements will be discussed later on this
course.

10
OUTPUT JCL statement and OUTPUT DD
parameter
• OUTPUT JCL statement with OUTPUT DD parameter is
used to specify the processing of SYSOUT datasets
Example
//ERXXXXXJ JOB ,,NOTIFY=&SYSUID
//OUT1 OUTPUT OUTDISP=PURGE
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
© Infosys Technologies Ltd.
//SYSOUT DD SYSOUT=*,OUTPUT=*.OUT1
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 11
anytime, anywhere!

Output JCL statement and OUTPUT DD parameter – Notes


OUPUT JCL statement is coded to specify the processing options for the SYSOUT data set.
The processing parameters are coded in OUTPUT statement because of the following
advantages:
1.To specify identical SYSOUT parameters for several DD statements with a single
OUTPUT statement.
2.To print the output from a single DD statement several times, each with different SYSOUT
parameters or on different printers.
In the above example, OUT1 is referred in SYSOUT DD statement. The important options in
OUTPUT statements are discussed in forthcoming slides.

11
Few more parameters for OUTPUT JCL
statement
• DEFAULT

• DEST

• CLASS

• JESDS

• NOTIFY
© Infosys Technologies Ltd.
• OUTDISP

• PRTY

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 12
anytime, anywhere!

Few more parameters for OUTPUT JCL statement – Notes


Few important parameters for OUTPUT JCL statement is listed here.
DEFAULT parameter:
DEFAULT=YES to inform the system that the OUTPUT statement is implicit and applies to
all SYSOUT DD statements in its range that do not contain an OUTPUT parameter
specifically referencing another OUTPUT statement. This can be called as implicit
referencing. DEFAULT=NO is the default and it means that the OUTPUT statement
parameters on it are applied only when an OUTPUT parameter refers back to this OUTPUT
statement. This can be called as explicit referencing.
DEST parameter:
DEST parameter is used to specify the destination for the SYSOUT data . Using this
SYSOUT sent to a remote device, a node or a user id.
CLASS parameter:
CLASS parameter is coded to specify the SYSOUT class. CLASS=* is coded to use the
MSGCLASS parameter on the JOB statement.

12
Few more parameters for OUTPUT JCL statement – Notes (Contd.)
JESDS parameter:
This parameter is coded to specify whether the JCL listing and job log apply to this OUTPUT
statement. The following are the options:
ALL – this requests JCL, LOG and MSG
JCL – this requests just the JCL listing
MSG – this requests the system messages for the job

NOTIFY parameter:
This is coded to send a message to a user ID. The following are the valid usage of this
parameter.
NOTIFY=node.userid
NOTIFY=userid
NOTIFY=(node.userid, node.userid, node.userid, node.userid)
NOTIFY=SYSUID , where SYSUID is the TSO user id by giving this , hardcoding of userid
can be avoided.

OUTDISP parameter:
OUTDISP=(normal-disposition,abnormal-disposition) is coded to control the disposition for
the normal and abnormal job termination. The following are the disposition for normal and
abnormal termination.
WRIITE – This option is used to print the output and delete it
HOLD – This option is coded to hold the output data set till the user releases it.
KEEP – This option is coded to print the output and then changes the disposition to LEAVE.
LEAVE – If this option is coded, the disposition is changed to KEEP after the user or the
operator release the output.
PURGE – This is coded to delete the output without printing it

PRTY parameter:
This parameter is used to specify the priority of the printing in the output queue

13
OUPUT JCL statement – Example (1/2)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//OUT1 OUTPUT
DEFAULT=YES,DEST=ERYYYYY,CLASS=A
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//STEP2 EXEC PGM=SBMPGM1
© Infosys Technologies Ltd.
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 14
anytime, anywhere!

OUPUT JCL statement – example (1/2) – Notes


In the above example, OUTPUT statement is coded with DEFAULT=YES, DEST=ERYYYYY
and CLASS=A options. These options become the default SYSOUT processing options for
all SYSOUT DD statements.

14
OUPUT JCL statement – Example (2/2)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//OUT1 OUTPUT DEFAULT=YES,DEST=ERYYYYY
//OUT2 OUTPUT OUTDISP=PURGE
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//STEP2 EXEC PGM=SBMPGM1
© Infosys Technologies Ltd.
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*,OUTPUT=*.OUT2
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 15
anytime, anywhere!

OUPUT JCL statement – example (2/2) – Notes


In the above example OUTPUT statement is coded in OUT1 and OUT2. OUT1 is coded with
DEFAULT=YES and becomes the default SYSOUT processing for all SYSOUT DD
statements in the job. OUT2 is coded with OUTDISP=PURGE to delete the output without
printing. Since OUT2 is referenced in STEP2, output for this step is deleted without printing.

15
SEGMENT parameter

• SEGMENT parameter is coded to start a data set printing

while the job step is running, even if the program is still

writing output to the data set.

• //ddname DD SYSOUT=class,SEGMENT=pages

• Example : © Infosys Technologies Ltd.

//SYSPRINT DD SYSOUT=A,SEGMENT=60

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 16
anytime, anywhere!

SEGMENT parameter – Notes


The SEGMENT parameter is coded to start a data set printing while the job step is running,
even if the program is still writing output to the data set. The pages denote the number of
pages to write in the data set before printing begins. SEGMENT parameter may be coded
for producing large amounts of output to overlap printing with execution of the job step to
complete the printing sooner. This can also be used to start multiple copies of the output
printing simultaneously on multiple printers. In the above example, each time the job
generates 60 pages in the data set, the system releases them for printing. Suppose there
are multiple printers installed in the system, the different 60 page segments may be printed
simultaneously on different printers.

Example:
//ERXXXXXJ JOB ,,NOTIFY=&SYSUID
//STEP1 EXEC PGM=SBMPGM1
//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*,SEGMENT=10
//
In the above example, suppose SYSOUT data produced is 40 pages, then 4 separate
segments , 10 pages in each, are produced for output processing.

16
RETPD parameter

• RETPD is coded to specify the retention period for data


sets on tape or direct-access volumes.
• Normally modification or deletion of a data set is not
allowed with an unexpired retention period.
• Once the retention period expired, the data set becomes
like any other data set without a retention check. It can
© Infosys Technologies Ltd.

be modified or deleted.
• //ddname DD RETPD=days

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 17
anytime, anywhere!

RETPD parameter – Notes


RETPD is coded to specify the retention period for data sets on tape or direct-access
volumes. Normally modification or deletion of a data set is not allowed with an unexpired
retention period. Once the retention period expired, the data set becomes like any other data
set without a retention check. It can be modified or deleted. RETPD parameter sets the
retention period in days. This is not coded for temporary data sets. The RETPD parameter
achieves the same result as the EXPDT parameter.

Example:
//ERXXXXXJ JOB ,,NOTIFY=&SYSUID,CLASS=D,MSGLEVEL=(1,1),MSGCLASS=X
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.TEST.DATA6,DISP=(NEW,CATLG),
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=800,
// SPACE=(TRK,(3,3)),RETPD=10
//
In the above example data set is not eligible for deletion or written over for 10 days.

17
ABSTR for SPACE parameter

• ABSTR is coded to allocate a given number of tracks at a


starting track address.

• This gives contiguous space and is used only for location


dependent data sets.

• Data set cannot be moved.

• The system allocates only ©when


Infosys Technologies Ltd.
all the tracks are
available.

• SPACE=(ABSTR,(quantity,address,directory))

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 18
anytime, anywhere!

ABSTR for SPACE parameter – Notes


ABSTR is coded to allocate a given number of tracks at a starting track address. This gives
contiguous space. It should be used for only location dependent data sets. The data set
cannot be moved. Quantity is the number of tracks and address is the relative track address
of the first track wanted. The address of the first track on a disk volume is zero and it cannot
be allocated because it contains the pointer to the table of contents. To allocate space for a
partitioned data set directory option is coded.

18
ROUND for SPACE parameter

• ROUND allows to request space in units of track size or


block size and allocates the space on cylinder
boundaries, as if CYL is coded.
• It is a device-independent way of allocating space in
cylinders.
• The system computes the space and rounds up to the
© Infosys Technologies Ltd.
nearest cylinder.
• The system allocates complete cylinders so that the
space begins on the first track of a cylinder and ends on
the last track.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 19
anytime, anywhere!

ROUND for SPACE parameter – Notes


ROUND allows to request space in units of track size or block size and allocates the space
on cylinder boundaries, as if CYL is coded. It is a device-independent way of allocating
space in cylinders. The system computes the space and rounds up to the nearest cylinder.

Example:

SPACE=(1000,800,,,ROUND),UNIT=3390

19
Other special options for SPACE parameter
(1/2)
• RLSE option is coded to release all unused space when
you close a data set after you have opened it for output
and written in to it.
• CONTIG option is coded to allocate all the primary space
on contiguous tracks and cylinders.
• MXIG option is coded to allocate the primary space as
the largest contiguous free©area
Infosys Technologies Ltd.
on a volume.
• ALX option is coded to allocate the primary area by
building up a list of the five largest contiguous, free areas
on the volume.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 20
anytime, anywhere!

Other special options for SPACE parameter (1/2) – Notes


RLSE option is coded to release all unused space when you close a data set after you have
opened it for output and written in to it. It permits the user to allocate more space than
needed without wasting space.
Example: SPACE=(4096,16,RLSE)

If only four blocks are written in the example, the system releases the space for the
remaining 12 blocks. The drawback of RLSE is it requires I/O time to release the space.

CONTIG option is coded to allocate all the primary space on contiguous tracks and
cylinders. The system allocates each extent on a contiguous way and because of this
CONTIG forces the primary space to be allocated in a single extent. If the contiguous space
is not available, the system terminates the job. MXIG option is coded to allocate the primary
space as the largest contiguous free area on a volume. MXIG can be used only for large
data sets which is an alternative for requesting secondary allocation. ALX option is coded to
allocate the primary area by building up a list of the five largest contiguous, free areas on the
volume. ALX is recommended to use for very large data sets as an alternative for requesting
secondary allocation.

20
Other special options for SPACE parameter
(2/2)

SPACE=(TRK,(5,5),RLSE)

SPACE=(100,(30,10),,CONTIG)

SPACE=(500,(1000,5,RLSE,ALX)

© Infosys Technologies Ltd.


SPACE=(50,(1000,20),,MXIG)

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 21
anytime, anywhere!

Other special options for SPACE parameter (2/2) – Notes


In example1, the system releases all unused space. In example2, the system allocates
space only if it is contiguous. In example3, the system allocates somewhere between 50000
bytes and the entire volume in five areas whose minimum size is 50000 bytes. The excess
space is released. In example4, the system allocate anywhere between 50000 bytes and the
entire volume in contiguous space.

21
OUTLIM parameter
• OUTLIM parameter is coded to limit the number of logical
records in the SYSOUT data.
• It is valid only on DD statement with SYSOUT parameter.
• OUTLIM=number (maximum number of logical records)
• Example:

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=SBMPGM1 © Infosys Technologies Ltd.

//STEPLIB DD DSN=OPERN.COBOL.LOADLIB,DISP=SHR
//SYSOUT DD SYSOUT=*,OUTLIM=10
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 22
anytime, anywhere!

OUTLIM parameter – Notes


OUTLIM parameter is coded to limit the number of logical records in the SYSOUT data. It is
valid only on DD statement with SYSOUT parameter. Once the limit is reached, the system
exits to the SYSOUT limt exit routine. If there is a installation-specific routine available, the
routine can determine whether to terminate the job or increase the limit. The system
terminates the job if there is no installation supplied routine available. In the above example,
there will be 10 logical records in spool and the job terminates once this is reached.

22
Storage Management Subsystem (SMS)

• Storage Management Subsystem (SMS) is the optional


facility in the operating system to manage user disk data
sets.
• Classes of disk data sets with similar characteristics are
established by administrator.
• SMS parameters are applied to only new data sets.
© Infosys Technologies Ltd.

• Create SMS managed data sets on disks and on tapes.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 23
anytime, anywhere!

Storage Management Subsystem (SMS) – Notes


SMS is the feature of the operating system which helps to manage the user disk data sets. It
is done through coding parameters on DD statement. An administrator or operator
establishes the classes of disk data sets having similar properties. While creating the data
sets these classes are coded to obtain the characteristics defined for a particular class.
These SMS classes are applied only to new data sets. It is ignored by the system for
existing data sets. If you code SMS parameters for DD *, DD DATA, JOBCAT, JOBLIB DD
and SYSOUT data sets, the system will ignore it.

23
Important SMS parameters

• DATACLAS
• STORCLAS
• MGMTCLAS
• SECMODEL
• LIKE
• REFDD © Infosys Technologies Ltd.

• RECORG
• KEYOFF

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 24
anytime, anywhere!

Important SMS parameters – Notes


In this course, important SMS parameters like STORCLAS, DATACLAS, MGMTCLAS,
SECMODEL, LIKE, REFD, RECORG, KEYOFF and DSNTYPE are discussed.

24
DATACLAS parameter
• The DATACLAS parameter is used to define the
following DD parameters
– RECFM
– LRECL
– AVGREC and SPACE
– RETPD
– EXPDT
– DSNTYPE for extended©sequential and
Infosys Technologies Ltd. partitioned

datasets
– KEYLEN for direct data sets
– RECORG, KEYOFF, IMBED, REPLICATE, CISIZE,
FREESPACE and SHAROPTIONS for VSAM
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 25
anytime, anywhere!

DATACLAS parameter – Notes


DATACLAS parameter can be coded for VSAM data sets, PS data sets and PDS data sets.
It is used to define data set allocation parameters such as RECFM, LRECL, AVGREC,
SPACE, RETPD, EXPDT etc. Some of the important parameters are discussed in this
course.

25
DATACLAS - example
• Assume a data class named COBDS is established for
Cobol source program libraries with following
parameters:
– RECFM=VB
– LRECL=255
– AVRGREC=U
– SPACE=(0,(150,50,10))© Infosys Technologies Ltd.
• The following can be coded:
//DATA1 DD
DSN=ERXXXXX.COBOL.LIB,DISP=(NEW,CATLG),
// DATACLAS=COBDS
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 26
anytime, anywhere!

DATACLAS – example
In the above example, COBDS is the assumed data class with specified data set allocation
parameters. The new data set with name ERXXXXX.COBOL.LIB is allocated with the
characteristics defined in the data class COBDS.
If you want to override the values in DATACLAS then you can code those parameters in
JCL. Suppose it is required to allocate 60 directory blocks in the above example, the
following can be coded:

//DATA1 DD DSN=ERXXXXX.COBOL.LIB,DISP=(NEW,CATLG),
// DATACLAS=COBDS,SPACE=(,(,,60))
Note:

AVGREC parameter is coded to specify the units of allocation requested for storage space
are records.
AVGREC=U/K/M
U - Units
K - Thousands
M – Millions
The primary and secondary space quantities represents these units or thousands or millions
of records as coded.

26
STORCLAS parameter

• STORCLAS parameter is coded while creating a data set


to make it SMS managed.
• It is coded to replace the UNIT and VOL parameters
• Administrator establishes STORCLAS names assigned
to units and volumes.
• All SMS managed data sets must
© Infosys be cataloged
Technologies Ltd.

• The system catalogs temporary SMS managed data sets


when it creates them and un-catalogs them when it
deletes them.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 27
anytime, anywhere!

STORCLAS – parameter – Notes


To make a data set SMS managed STORCLAS is coded. It replaces the UNIT and VOL
parameter for creating new data sets. STORCLAS is similar to UNIT group names. The
advantage of STORCLAS is that new values can be set at any time or old values can be
changed. Attributes in STORCLAS cannot be overridden by JCL parameters.

27
STORCLAS - Example

• Assume PUBLIC is the storage class name established

in the system. Then you can code the following:

//DATA1 DD DSN=ERXXXXX.COBOL.LIB,DISP-(NEW,CATLG),
// STORCLAS=PUBLIC

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 28
anytime, anywhere!

STORCLAS – example – Notes


In the above example PUBLIC is the storage class established by the administrator. The
data set ERXXXXX.COBOL.LIB is created with the attributes defined in PUBLIC storage
class.

28
MGMTCLAS parameter
• This parameter does not replace any DD parameters
• The following are the usage of management class
– Migration of inactive data sets to archival storage
– To determine how often to backup the data set
– To determine how often to compress partitioned data
sets
– To do cost accounting on data sets
© Infosys Technologies Ltd.

– To release unused space in a data set


– To delete data sets whose retention period has
expired
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 29
anytime, anywhere!

MGMTCLAS parameter – Notes


MGMTCLAS parameter does not replace any DD parameter. It is used to define the
characteristics that control the maintenance of the data sets. Management class attributes
cannot be overridden by JCL parameters. MGMTCLAS overrides the attributes of
DATACLAS parameter.

29
MGMTCLAS - example

• Assume that AVLBLE is the name management class


established in the system. Then you can code the
following:

//DATA1 DD DSN=ERXXXXX.COBOL.LIB,DISP=(NEW,CATLG),
//STORCLAS=PUBLIC,DATACLAS=COBDS,MGMTCLAS=AVLBLE
© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 30
anytime, anywhere!

MGMTCLAS – example – Notes


In the above example AVLBLE is the name management class

30
SECMODEL parameter

• SECMODEL parameter replaced the PROTECT DD


parameter.

• It overrides any PROTECT parameter

• It assigns a RACF profile name to a new data set

• SECMODEL=profile
© Infosys Technologies Ltd.

• SECMODEL=(profile,GENERIC) - the profile refers to a


generic data set profile

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 31
anytime, anywhere!

SECMODEL parameter – Notes


SECMODEL is coded to assign RACF profile to a new data set. The following information
from the RACF data set is copied to the data set profile of the new data set:
1.OWNER - the user or group assigned as the owner of the data set
2.ID - the access list of users or groups who can access the data set
3.UACC - this is to assign universal access authority to the data set
4.AUDIT/GLOBALAUDIT - This is to tell which access attempts to log
5.ERASE - The disk storage is erased when you delete the data set
6.LEVEL - to specify installation defined level indicator
7.DATA - to specify Installation defined
8.WARNING – issue warning message
9.SECLEVEL - to give name to the installation defined security level

Note: PROTECT DD parameter is coded to request the RACF to protect the data set.
PROTECT=YES|Y

31
LIKE parameter
• LIKE parameter is coded to copy the DD information
from an existing cataloged data set on disk.
• This also copies any SMS attributes for the data set
referred.
• LIKE=dataset name
• The system copies the following information if it is not
supplied in the DD statement.
– RECFM, RECORG for VSAM data sets, LRECL
© Infosys Technologies Ltd.
– SPACE, AVGREC
– DSNTYPE
– KEYLEN for normal direct data sets
– KEYOFF for VSAM KSDS data sets
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 32
anytime, anywhere!

LIKE parameter – Notes


LIKE parameter is used to code DD information from model data set. It also copies SMS
attributes for the referenced data set. The system copies the allocation information such as
RECFM, RECORG, SPACE, DSNTYPE, KEYLEN and KEYOFF.
LIKE parameter is not coded to get attributes of a dataset or generations of GDG. Attributes
obtained using LIKE parameter overrides the attributes of DATACLAS parameter.

32
LIKE parameter - Example

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.TEST.DATA2,DISP=(NEW,CATLG),
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=800,
// SPACE=(TRK,(3,3))
//STEP2 EXEC PGM=IEFBR14
//DD2 DD DSN=ERXXXXX.TEST.DATA3,DISP=(NEW,CATLG),
© Infosys Technologies Ltd.
// UNIT=SYSDA,LIKE=ERXXXXX.TEST.DATA2
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 33
anytime, anywhere!

LIKE parameter – example


In the above example step1 allocates a new data set ERXXXXX.TEST.DATA2. In step2
ERXXXXX.TEST.DATA3 is allocated using LIKE parameter which refers to the data set
ERXXXXX.TEST.DATA2.

33
REFDD parameter

• REFDD parameter is coded to refer back to a DD


statement.
• The system copies the DD information from a previous
DD statement.
• REFDD copies information from the DD statement, not
from the data set described© Infosys
by the DD statement.
Technologies Ltd.

• REFDD=*.referback

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 34
anytime, anywhere!

REFDD parameter – Notes


REFDD is coded to copy the attributes from a data set defined on an earlier DD statement in
the same job. REFDD is not coded along with LIKE parameter. REFDD is not coded to get
attributes from a dataset or generations of GDG. Attributes obtained using LIKE parameter
overrides the attributes of DATACLAS parameter.

34
REFDD parameter - Example

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.TEST.DATA4,DISP=(NEW,CATLG),
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=800,
// SPACE=(TRK,(3,3))
//STEP2 EXEC PGM=IEFBR14
//DD2 DD
© Infosys Technologies Ltd.
DSN=ERXXXXX.TEST.DATA5,DISP=(NEW,CATLG),
// UNIT=SYSDA,REFDD=*.STEP1.DD1
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 35
anytime, anywhere!

REFDD parameter – example – Notes


In the above example step1 allocates a new data set ERXXXXX.TEST.DATA4. In step2
ERXXXXX.TEST.DATA5 is allocated by referring to DD1 in step1.

35
RECORG and KEYOFF parameters
• RECORG and KEYOFF parameters are used to create
VSAM data sets through JCL.
• RECORG is coded to specify the VSAM data set
organization. RECORG=type. The following are the valid
types.
– KS (for KSDS)
– ES (for ESDS)
© Infosys Technologies Ltd.
– RR (for RRDS)
– LS (for LDS)
• KEYOFF is coded to specify the offset of the keys in a
KSDS data set. KEYOFF=bytes.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 36
anytime, anywhere!

RECORG and KEYOFF parameters – Notes


RECORG and KEYOFF parameters are used to create VSAM data sets using JCL.
RECORG is coded to specify the type of the VSAM data set. KEYOFF is coded to specify
the offset of the keys in a KSDS data set. RECORG parameter overrides the record
organization defined in DATACLAS.

36
RECORG and KEYOFF - Example

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.KSDS.DATA1,DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(10,10)),
// LRECL=80,
// KEYOFF=0,KEYLEN=5,RECORG=KS
// © Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 37
anytime, anywhere!

RECORG and KEYOFF – example – Notes


In the above example ERXXXXX.KSDS.DATA1 is the VSAM KSDS data set allocated with
key length 5.

37
DSNTYPE parameter

• DSNTYPE parameter is coded to specify:


– A new partitioned data set
– A new partitioned data set extended (PDSE)
– A new hierarchical file system (HFS) data set
– A new first-in-first-out (FIFO) special file. It is also
called as pipe. © Infosys Technologies Ltd.

• DSNTYPE=LIBRARY | PDS | HFS | PIPE

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 38
anytime, anywhere!

DSNTYPE parameter – Notes


DSNTYPE parameter is coded to specify a new PDS, a new PDSE, a new HFS data set or a
new FIFO special file. If DSNTYPE is not coded, the data set type is determined by other
parameters. DSNTYPE parameter overrides the DSNTYPE attribute in the DATACLAS
parameter for the data set.

38
DSNTYPE parameter – Examples (1/4)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.PDS.ONE,DISP=(NEW,CATLG),
// STORCLAS=PUBLIC,
// DSNTYPE=PDS,
// RECFM=U,BLKSIZE=800,DSORG=PO,
© Infosys Technologies Ltd.
// SPACE=(TRK,(5,5))
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 39
anytime, anywhere!

DSNTYPE parameter – examples (1/4) – Notes


In the above example, a new PDS named ERXXXXX.PDS.ONE is allocated.

39
DSNTYPE parameter – Example (2/4)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.PDS.EXT1,DISP=(NEW,CATLG),
// STORCLAS=PUBLIC,
// DSNTYPE=LIBRARY,
// LRECL=80,BLKSIZE=800,RECFM=FB,DSORG=PO,
// SPACE=(TRK,(5,5)) © Infosys Technologies Ltd.

//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 40
anytime, anywhere!

DSNTYPE parameter – example (2/4) – Notes


In the above example DSNTYPE=LIBRARY is coded. A new partitioned data set extended
named ERXXXXX.PDS.EXT1 is allocated.

40
DSNTYPE parameter – Example (3/4)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=ERXXXXX.HFS.ONE,DISP=(NEW,CATLG),
// STORCLAS=PUBLIC,
// DSNTYPE=HFS,
// AVGREC=K, © Infosys Technologies Ltd.
// SPACE=(1,(5,5))
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 41
anytime, anywhere!

DSNTPYE parameter – example (3/4) – Notes


In the above example, DSNTPYE=HFS is coded. A HFS file named ERXXXXX.HFS.ONE is
allocated. HFS data set is used by UNIX system services. It contains a mountable file
system. It is a partitioned format data set, similar to a PDSE.

41
DSNTYPE parameter – Example (4/5)

//ERXXXXXJ JOB ,,NOTIFY=&SYSUID


//STEP1 EXEC PGM=IEFBR14
//DD1 DD PATH='/u/erxxxxx/pipe1',
// PATHOPTS=(OWRONLY,OEXCL,OCREAT),
// PATHMODE=(SIWUSR,SIRGRP),
// PATHDISP=(KEEP,DELETE),
© Infosys Technologies Ltd.
// DSNTYPE=PIPE
//

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 42
anytime, anywhere!

DSNTYPE parameter – example (4/5) – Notes


In the above example DSNTYPE=PIPE is coded and FIFO file is created. PATH,
PATHOPTS and PATHDISP parameters are coded. PATH is coded to specify the name of
the HFS file. PATHMODE is coded to specify the file access attributes. PATHDISP is coded
to specify the disposition of an HFS file when the job step ends normally or abnormally.

42
JES2 and JES3 Subsystems

• JES2 and JES3 are the two subsystems for submitting

jobs controlled by JCL in a multi computer network.

• JES2 and JES3 provide similar functions. They schedule

jobs through a central input queue and route the output

to the appropriate devices.


© Infosys Technologies Ltd.

• An installation can have both JES2 and JES3

subsystems

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 43
anytime, anywhere!

JES2 and JES3 Subsystems – Notes


Mainframe Operating System can have one or more computers or peripherals connected.
When a job is submitted, operating system must know to which computer or peripheral the
job is to be directed. Job Entry subsystem contains a series of programs and controls to
manage job scheduling and processing. Functions of JES2/JES3 subsystems are similar.
The steps involved in job scheduling and processing have been discussed in the topic
stages of job processing.

43
JES2 Subsystem
• JES2 is a decentralized system.
• Output of the job are redirected to specific computer or
peripheral connected to the computer.

JES2 JES2 JES2

© Infosys Technologies Ltd.

DASD DASD DASD

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 44
anytime, anywhere!

JES2 Subsystem – Notes


In JES2, the computers are connected in a network. Each computer is termed as node.
JES2 is a decentralized system in which each computer runs independently and selects jobs
from the single job queue as it sees fit. JES2 statements direct the job to a computer in a
network or route the output to some destination

44
JES3 Subsystem
• JES3 is highly centralized network with one computer
and one group of operators controlling all the other
computers.
• Global Processor
• Local Processors
• Main Processors

© Infosys Technologies Ltd.

Global Processor DASD

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 45
anytime, anywhere!

JES3 Subsystem – Notes


In JES3, several computers are connected closely together. All the scheduling is done by a
single computer termed the global processor. All the jobs are placed in a single job queue.
The global processor schedules the jobs either to itself or to the other computers connected
to it. The computers connected to global processor are termed as local processors. The
global and local processors together are called as main processors.

45
JES2 Control Statements (1/3)

• Coding rules
– You cannot place JES2 statements in a cataloged
procedure.
– Code /* in columns 1 to 2 rather than //.
– You cannot code comments on JES2 statements. Use
a JCL statement instead.
– Except for the /*OUTPUT statement, no JES2
statements may be © Infosys
continued.
Technologies Ltd.Write multiple
statements instead.
– If you write the same parameter more than once on a
JES2 statement, JES2 uses the last instance.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 46
anytime, anywhere!

JES2 Control Statements (1/3) – Notes

Two statements, the JES command and /*PRIORITY are placed in front of the JOB
statement. Place the remaining statements following the JOB statement.

JES2 Control Statements - Coding rules


You cannot place JES2 statements in a cataloged procedure.
Code /* in columns 1 to 2 rather than //.
You cannot code comments on JES2 statements. Use a JCL statement instead.
Except for the /*OUTPUT statement, no JES2 statements may be continued. Write
multiple statements instead.
If you write the same parameter more than once on a JES2 statement, JES2 uses
the last instance.

46
JES2 Control Statements (2/3)
JES2 Statement Syntax Description

JOBPARAM /*JOBPARAM option,option… Specifies processing options for


a job.

MESSAGE /*MESSAGE message Specifies the job account


number.

NETACCT /*NETACCT account-noa Specifies the job account


number.

NOTIFY /*NOTIFY user-id Notifies the specified user when


the job is completed.
© Infosys Technologies Ltd.

OUTPUT /*OUTPUT code,option,option… Specifies SYSOUT processing


options.

PRIORITY /*PRIORITY priority Specifies the job priority.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 47
anytime, anywhere!

JES2 Control Statements (2/3) – Notes


A list of JES2 statements is given above. PRIORITY statement is same as the PRTY
parameter on the JOB statement. If coded, this statement must be placed before the JOB
statement.

47
JES2 Control Statements (3/3)
JES2 Statement Syntax Description

ROUTE /*ROUTE {XEQ|PRINT} node Routes the job for execution or


printing to a specific JES2 node.
SETUP /*SETUP volume,volume… Instructs the operator to mount the
specified tape volumes prior to job
execution.
SIGNOFF /*SIGNOFF Ends a remote session. This
statement may be placed anywhere
in the job stream.
SIGNON /*SIGNON REMOTEnnn Begins a remote job entry session.
© Infosys Technologies
[password] [new-password] Ltd.
Same as /*ROUTE XEQ.
[password2]
XEQ /*XEQ node Routes the job to node for
execution.
XMIT /*XMIT node [DLM=xx] Transmits data to another JES2
node. DLM specifies the delimiter; if
omitted, /* is assumed.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 48
anytime, anywhere!

JES2 Control Statements (3/3) – Notes


While coding SIGNON statement REMOTEnnn begins in column 16; password begins in
column 25; new-password begins in column 35; password2 begins column 73. If coded, this
statement must be the first statement in the job stream.

48
JES3 Control Statements (1/3)
• Coding rules
– JES3 statements begin with //* in columns 1 to 3 and
the commands begin in column 4.
– You cannot place JES3 statements in a cataloged
procedure.
– To continue a JES3 statement, end the statement
after a comma, code a //* on the
© Infosys nextLtd.line, and
Technologies

continue in column 4.
– All JES3 statements except the command statement
are placed following the JOB statement.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 49
anytime, anywhere!

JES3 Control Statements (1/3) – Notes


Many of the parameters specified on the JES3 statements are the same as those written on
JCL statements. Parameters specified on JES3 statements take precedence over the same
parameter over the same parameters on the JCL statements.

49
JES3 Control Statements (2/3)
JES3 Statement Syntax Description

DATASET //*DATASET DDNAME=ddname,option,option… Supplies data for an in-


stream data set.
ENDDATASET //*ENDDATASET Indicates the end of an
in-stream data set.
ENDPROCESS //*ENDPROCESS Indicates the end of a
series of //*PROCESS
statements
FORMAT //*FORMAT PR,option,option… Specifies options for
SYSOUT data.
© Infosys Technologies Ltd.
MAIN //*MAIN option,option… Specifies job processing
options.
NET //*NET option,option… Specifies dependencies
between jobs.
NETACCT //*NETACCT option,option… Specifies job accounting
information.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 50
anytime, anywhere!

JES3 Control Statements (2/3) – Notes


A list of JES3 statements is given in the above table. DATASET statement must be placed
immediately before the first record of the in-stream data and the data is terminated by an
//*ENDDATASET statement.

50
JES3 Control Statements (3/3)
JES3 Statement Syntax Description

OPERATOR //*OPERATOR message Sends a message to the


operator

PAUSE //**PAUSE Pauses the input reader until


the operator issues a *START
operator command.
PROCESS //*PROCESS option Controls JES3 job processing.
An //*ENDPROCESS statement
must follow any //*PROCESS
statement.
© Infosys Technologies Ltd.
ROUTE //*ROUTE XEQ node Routes the job to another JES3
node.

SIGNOFF /*SIGNOFF Ends a remote job session.

SIGNON /*SIGNON Begins a remote job session.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 51
anytime, anywhere!

JES3 Control Statements (3/3) – Notes


OPERATOR statement may be placed anywhere after the JOB card. PAUSE statement
must be placed before the JOB statement. SIGNON and SIGNOFF statements have same
format as they do with JES2.

51
System Display and Search Facility (SDSF)
• SDSF is the utility to monitor, control and view the output
of the jobs in the system
• Following can be done using SDSF
– Viewing the system log
– Entering system commands
– Controlling job processing by hold, release, purge,
cancel
– Displaying job output before
© Infosysprint
Technologies Ltd.

– Controlling the order of job processing


– Controlling the order of output printing
– Controlling initiators and printers

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 52
anytime, anywhere!

System Display and Search Facility (SDSF) – Notes


SDSF provides easy way to monitor, manage and control the jobs in the system.
The following actions through SDSF helps to manage the jobs:
1.Cancelling, holding and releasing jobs
2.Finding out waiting jobs
3.Filtering the jobs that you want
4.Viewing the output before it is printed
5.Changing job’s priority, class and destination
6.Editing and resubmitting the JCL

The following are the information displayed by SDSF:


1.Return code for a job
2.Total number of logical records to be printed
3.Classes assigned to the output
4.Forms needed for printing
5.The output creation date

52
SDSF primary option menu

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 53
anytime, anywhere!

SDSF primary option menu – Notes


The above screen shows the SDSF primary option menu.

53
JES spool data sets
• I – Input queue
• DA – Execution queue
• O – output queue
• H – Held queue
• ST – status queue

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 54
anytime, anywhere!

JES spool data sets – Notes


Input queue:
The user can see the information about jobs, started tasks, and TSO users on the JES input
queue or executing in this input queue.
DA queue:
The user can see the information about MVS address spaces (jobs, started tasks, and TSO
users) that are running in this DA queue.
Output queue:
This queue has the display information about SYSOUT data sets for jobs, started tasks, and
TSO users on any non-held JES2 output queue.
Held queue:
This queue shows the user information about SYSOUT data sets for jobs, started tasks, and
TSO users on any held JES2 output queue.
Status queue:
The Status queue helps the user to display information about jobs, started tasks, and TSO
users on the JES queues.

54
Status (ST) panel

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 55
anytime, anywhere!

Status (ST) panel – Notes


In the above screen list of jobs, started tasks, and TSO users on the JES queues are
displayed.
Pre * gives all the jobs in the spool
Owner * - Jobs for all the owners
Pre <Job name> gives only the particular job
E.g.
Pre CICS1
Owner ERXXXXX - Gives the list of jobs submitted by the owner ERXXXXX

55
Columns on the ST panel (1/3)
Column Name Title Width Description
JNAME JOBNAME 8 This is the fixed field for Job name
JOBID JobID 8 Job ID assigned by JES
OWNERID Owner 8 User ID of job owner, or default values
of ++++++++ or ????????, if user ID
not defined to RACF
JPRIO Prty 4 Priority of the job in the JES job queue
QUEUE Queue 10 Name of the JES queue for job
© Infosys Technologies Ltd.
JCLASS C 1 Input class for JES
POS Pos 5 Position in JES queue
SYSAFF SAff 5 JES execution system affinity (if any)

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 56
anytime, anywhere!

Columns on the ST panel (1/5) – Notes


In the above table description about columns JOBNAME, JobID, Owner, Prty, Queue, C,
Pos and Saff is given. The list of columns are installation dependent.

56
Columns on the ST panel (2/3)
Column Title Width Description
Name
ACTSYS ASys 4 JES active system ID (if job active)
STATUS Status 17 Status of job
PRTDEST PrtDest 18 JES print destination name
SECLABEL SecLabel 8 Security label of job
TGNUM TGNum 5 Track groups used by a job
TGPCT TGPct 6 Percentage of total track group usage
© Infosys Technologies Ltd.
ORIGNODE OrigNode 8 Origin node name
EXECNODE ExecNode 8 Execution node name
DEVID Device 18 JES device name
RETCODE Max-RC 10 Return code information for the job

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 57
anytime, anywhere!

Columns on the ST panel (2/5) –Notes


In the above table description about the columns Asys, Status, PrtDest, SecLabel, TGNum,
TGPct, OriginNode, ExecNode, Device and Max-RC are given.

57
Columns on ST panel (3/3)
Column Name Title Width Description
SRVCLS SrvClass 8 Service class
WLMPOS WPos 5 Position on the WLM queue
SCHENV Scheduling 16 Scheduling environment for the job
-Env
DELAY Dly 3 Indicator that job processing is delayed
SSMODE Mode 4 Subsystem managing the job (JES or
WLM)
SPIN Spin 4 Indicator
© Infosys of whether
Technologies Ltd. the job is eligible to
be spun

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 58
anytime, anywhere!

Columns on ST panel (3/5) – Notes


In the above screen, columns SrvClass, Wpos, Scheduling-Env, Dly, Mode and Spin are
introduced.

58
Submitting Jobs using COBOL

• Generate JCL as a output from COBOL program

• Submit this out put to the input stream as a job

• This can be done by coding SYSOUT DD as follows

//ddname DD SYSOUT=(class,INTRDR)

© Infosys Technologies Ltd.


• If generated JCL has no MSGCLASS parm default is
SYSOUT class

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 59
anytime, anywhere!

Submitting Jobs using COBOL – Notes


For submitting jobs by generating JCL using COBOL program we use internal reader. The
COBOL program generates JCL to a output file and this in turn goes to the input stream as a
job. This can be done by coding SYSOUT DD as follows
//ddname DD SYSOUT=(class, INTRDR)

If the generated JCL has no MSGCLASS parameter then default is SYSOUT class.

59
COBOL program which generates JCL (1/2)

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 60
anytime, anywhere!

COBOL program which generates JCL (1/2) – Notes

Cobol program which prepares JCL to be submitted through internal reader.


COBOL program which generates JCL (2/2)

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 61
anytime, anywhere!

COBOL program which generates JCL (2/2) – Notes

Continuation of Cobol program which prepares JCL to be submitted through internal reader.
JCL used to submit COBOL load module

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 62
anytime, anywhere!

JCL used to submit COBOL load module – Notes

JCL which is used to execute the load module of the COBOL program.
Job submission - response

•Two job outputs you can observe here


– First one is corresponding to the COBOL load
module job
– Later corresponding to© Infosys
JOBTechnologies Ltd.
submitted through
COBOL

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 63
anytime, anywhere!

Job submission – response – Notes

Two job outputs you can observe here:


1. First one is corresponding to the COBOL load module job
2. Later corresponding to JOB submitted through COBOL
Job submitted by COBOL program

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 64
anytime, anywhere!

Job submitted by COBOL program – Notes

This is the job generated by COBOL program and submitted by internal reader.
Submitting jobs through REXX

• Use TSO SUBMIT command to submit the job

• Sample REXX code shown below to submit JCL

/* REXX */
"SUBMIT (‘pds_name(jcl_name)')"
EXIT

• Execute REXX program with


© Infosys Technologies Ltd.

TSO EXEC ‘pds_name(rexx_prog_name)'

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 65
anytime, anywhere!

Submitting jobs through REXX – Notes


For submitting JCLs from REXX program is easy and straight away process. Use TSO
SUBMIT command to submit the job. In the code snippet we have not used TSO keyword
before SUBMIT because for REXX default environments is TSO. Then execute this REXX
exec with following command.

TSO EXEC ‘pds_name(rexx_prog_name)’


REXX program which submits JCL

© Infosys Technologies Ltd.

Job submission response

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 66
anytime, anywhere!

REXX program which submits a JCL – Notes

This is the REXX program which is used to submit JCL program JCL2.
JCL submitted through REXX program

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 67
anytime, anywhere!

JCL submitted through REXX program – Notes

This is the JCL submitted by REXX program.


JCL behind TSO Subsystem

//INFBANG JOB 'ACCT#',REGION=4096K


//IKJINTST EXEC IKJINTST
XXIKJINTST PROC
XXIKJINTST EXEC
PGM=IKJEFT01,DYNAMNBR=180,PARM=ISPFINT
XXSYSPROC DD DISP=SHR,DSN=CPAC.CMDPROC
XXSYSHELP DD DISP=SHR,
XX DSN=SYS1.HELP
XX DD DISP=SHR,
XX DSN=ISP.SISPHELP © Infosys Technologies Ltd.
XXSYSLBC DD DISP=SHR,
XX DSN=SYS1.BRODCAST
XXSYSPRINT DD TERM=TS,SYSOUT=*
XXSYSTERM DD TERM=TS,SYSOUT=*
XXSYSIN DD TERM=TS
XX*
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 68
anytime, anywhere!

JCL behind TSO Subsystem – Notes

INFOSYS LOGON PROCEDURE FOR ALL USERS

This procedure enables users to log on to TSO/E.


The CLIST ISPFINT,which resides in CPAC.CMDPROC, is executed at first to invoke the
ISPF.

ISP.SISHELP(ISPF) provides function that inovkes the ISPF command to start the ISPF
PDF facility.
SYS1.BRODCAST provides broadcast information that is available
JCL behind CICS Subsystem (1 of 2)
• To execute CICS job, invoke procedure CICS which
executes DFHSIP program.
• DFHSIP contains System Initialization parameters for
CICS region.
• If Language Environment is required, the
SCEECICS,SCEERUN2 and SCEERUN datasets are
needed in DFHRPL. © Infosys Technologies Ltd.

• Add the datasets of all the subsystem that CICS regions


supports such as IMS, DB2.. Etc.,
• Insert Auxiliary temporary and Trace data sets.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 69
anytime, anywhere!

JCL behind CICS Subsystem (1 of 2) – Notes

Auxilary Temporary data set  CICSTS23.CICS.CNTL.CICS1.DFHTEMP


Trace dataset  CICSTS23.CICS.CICS1.DFHAUXT,
CICSTS23.CICS.CICS1.DFHBUXT
Local Catalog Dataset  CICSTS23.CICS.CICS1.DFHLCD
Global Catalog dataset  CICSTS23.CICS.CICS1.DFHGCD

Note: The above mentioned data sets are specific to the installation.
JCL behind CICS Subsystem (2 of 2)

• Add Local and Global Catalog data sets


• Include Local Request Queue Data set and Dump Data
sets.
• Add CICS System Definition Datasets.
• Run the Dump Utility Program DFHDU630 using the
Dump Data sets. © Infosys Technologies Ltd.

• Similarly Run the Trace Utility Program DFHTU630


using Trace Data sets.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 70
anytime, anywhere!

JCL behind CICS Subsystem (2 of 2) – Notes

LRQ Dataset  CICSTS23.CICS.CICS1.DFHLRQ


DUMP Dataset  CICSTS23.CICS.CICS1.DFHDMPA ,
CICSTS23.CICS.CICS1.DFHDMPB
CSD Datasets such as DFHHTML, REXX…
JCL behind DB2 Subsystem (1 of 3)

• JCL for DSN1DBM1 (DB2 subsystem)


– It starts the DB2 subsystem.
– This procedure executes a program DSNYASCP
which resides in DSN710.SDSNLOAD.
• JCL for DSN1MSTR
– It starts DB2 control Address space.
© Infosys Technologies Ltd.
– This procedure executes a program DSNYASCP
which resides in DSN710.SDSNLOAD with PARM as
DSNZPARM.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 71
anytime, anywhere!

JCL behind DB2 Subsystem (1 of 3) – Notes

JCL for DSN1DBM1 (DB2 subsystem)


It starts the DB2 subsystem.
This procedure executes a program DSNYASCP which resides in
DSN710.SDSNLOAD.
JCL for DSN1MSTR
It starts DB2 control Address space.
This procedure executes a program DSNYASCP which resides in
DSN710.SDSNLOAD with PARM as DSNZPARM.
JCL behind DB2 Subsystem (2 of 3)

• JCL for DSN1IRLM


– It starts IRLM Lock Manager Address Space.
– This procedure executes a program DXRRLM00
which resides in DSN.SDXRRESL.
• JCL for DSN1DIST
– It starts Distributed Data© facility Address
Infosys Technologies Ltd. space.

– This procedure executes a program DSNYASCP


which resides in DSN710.SDSNLOAD.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 72
anytime, anywhere!

JCL behind DB2 Subsystem (2 of 3) – Notes

JCL for DSN1IRLM


It starts IRLM Lock Manager Address Space.
This procedure executes a program DXRRLM00 which resides in DSN.SDXRRESL.
JCL for DSN1DIST
It starts Distributed Data facility Address space.
This procedure executes a program DSNYASCP which resides in
DSN710.SDSNLOAD.
JCL behind DB2 Subsystem (3 of 3)

• JCL for DSN1SPAS

– It starts DB2 Stored Procedure Address Space.

– This procedure executes a program DSNX9STP


which resides in DSN710.SDSNLOAD.

– The Parameters passed are Size of Address space,


© Infosys Technologies Ltd.

DB2 Subsystem Name, Number of TCBs to processes


User Request.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 73
anytime, anywhere!

JCL behind DB2 Subsystem (3 of 3) – Notes

JCL for DSN1SPAS

It starts DB2 Stored Procedure Address Space.

This procedure executes a program DSNX9STP which resides in


DSN710.SDSNLOAD.

The Parameters passed are Size of Address space, DB2 Subsystem Name,
Number of TCBs to processes User Request.
The LINKAGE Editor and LOADER

• The linkage editor makes a load module ready for

execution by linking with routines in external libraries.

• It requires inputs as

– Object module

– Subroutine or function library


© Infosys Technologies Ltd.

– Load modules

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 74
anytime, anywhere!

The LINKAGE Editor and LOADER – Notes


The linkage editor takes the output of compilation, a load module and combines it with
subroutines and functions from other libraries to form a load module ready for execution.
The compilers convert the source language statement into object module. An object module
is machine instructions . It cannot be executed. It must be linked to various routines and
functions and the output of this can be executed.
JCL for the Linkage Editor (1 of 3)
• The linkage editor, used IBM supplied Program IEWL
which resides in SYS1.LINKLIB.
//LKED EXEC PGM=IEWL, PARM=(Option,Option,…)

• The options are


– LIST: lists the linkage editor control statements.
– MAP: Helps to estimate©the region size needed for the
Infosys Technologies Ltd.
program.
– XREF: it includes cross-reference table of the load
module.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 75
anytime, anywhere!

JCL for the Linkage Editor (1 of 3) – Notes

The linkage editor, used IBM supplied Program IEWL which resides in SYS1.LINKLIB.
Normally the linkage editor step is named as LKED. The PARM options can be in any order.

LIST : Lists the linkage editor control statements and is usually specified
MAP : Produces a storage map showing the length and relative locations of all control
sections. It helps to estimate the region size needed for the program. It also helps to identify
the point of failure when a program abends. NOMAP is default.
XREF: includes MAP plus a cross-reference table of the load module. Map and XREF are
mutually exclusive.
CALL: To request automatic library lookup, which is default.
JCL for the Linkage Editor (2 of 3)
– CALL: to request automatic library lookup
– LET: marks load modules as executable even if minor
errors occur
– PRINT: allows the messages to be written to a
SYSLOUT DD statement
– AMODE: specifies whether the program uses 24 or 31
bit addressing
– RMODE: indicates whether the program can reside in
© Infosys Technologies Ltd.
virtual storage
– TERM : allows linkage editor diagnostic messages to
be written to a SYSTERM DD statement.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 76
anytime, anywhere!

JCL for the Linkage Editor (2 of 3) – Notes


LET marks load modules as executable even if minor errors are found. Code NOLET to
suppress execution if errors are found, is default.
PRINT allows the messages to be written to a SYSLOUT DD statement and is the default.
Code PRINT(*) to make the message displayed on the terminal. NOPRINT suppresses the
Link edit messages.
AMODE specifies whether the program uses 24 or 32 bit addressing. AMODE=ANY
specifies both. Default is compiler specific and usually it is AMODE=25.
RMODE indicates whether the program can reside in virtual storage Default is compiler
specific.
TERM causes linkage editor diagnostic messages to be written to a SYSTERM DD
statement. Default is NOTERM, not to print the messages if there is a SYSTERM DD
statement.
There are many options, which is less frequently used.
JCL for the Linkage Editor (3 of 3)

• Statements for linking


– SYSPRINT DD statement
– SYSUT1 DD statement
– SYSLIN DD statement
– Input stream
– SYSLMOD DD statement
© Infosys Technologies Ltd.

– SYSLIB DD statement
– Additional DD statement for additional input

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 77
anytime, anywhere!

JCL for the Linkage Editor (3 of 3) – Notes


The linkage editor reads and processes input in two DD statements and the input stream in
the following order
SYSLIN DD statement : It describes the temporary data set that contains object modules
passed from the compile step.
Input stream : It is concatenated to SYSLIN, which contains compiled subroutines and
control statements
SYSLIB DD statement : It describes subroutine or function libraries to be searched. Several
libraries can be concatenated together in the statement.

SYSPRINT DD statement to describe print data set


SYSUT1 DD statement to allocate a scratch data set
SYSLIN DD statement to describe the primary input
SYSLMOD DD statement to describe the data set that contains the load module.
SYSLIB DD statement is needed for automatic call look up
Additional DD statement may be included to describe additional sources of input.
Sample LINK-EDIT JCL

//LINKEDIT EXEC PGM=HEWL,REGION=4096K,COND=(5,LT),


// PARM='XREF,RMODE=ANY,AMODE=31'
//SYSLIB DD DSN=DSN710.SDSNLOAD,DISP=SHR
// DD DSN=CICSTS23.CICS.SDFHLOAD,DISP=SHR
// DD DSN=SYS1.DSN710.SDSNLINK,DISP=SHR
// DD DSN=CEE.SCEELKED,DISP=SHR
//DB2LOAD DD DSN=DSN710.SDSNLOAD,DISP=SHR
//SYSLMOD DD DSN=OPERN.CICS1.LOADLIB(REPOT),DISP=SHR
//SYSUT1 DD UNIT=SYSDA,DCB=BLKSIZE=1024,
© Infosys Technologies Ltd.
// SPACE=(1024,(200,20))
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSN=&LOADSET,DISP=(OLD,DELETE)
// DD DSN=&COPYLINK,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 78
anytime, anywhere!

Sample link edit JCL – Notes


A sample link edit JCL for link editing COBOL object codes is given here.
Linkage –Editor Control statements

• ENTRY Statement

• INCLUDE Statement

• LIBRARY Statement

• NAME Statement

• REPLACE Statement
© Infosys Technologies Ltd.
• PAGE Statement

• ORDER Statement

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 79
anytime, anywhere!

Linkage – Editor Control statements – Notes


For special processing various control statements can be added. The control statements can be
added before or after object modules or other control statements. Control statements are used to
combine, delete, replace and order control sections.
Control statements are used to combine, delete, replace and order control sections. It is coded in
columns 2 through 71.
The Entry statement specifies the first instruction to be executed in a load module. It can be a control
section name or entry name within a control section. Each load module must have an entry point. If
the ENTRY statemnet is omitted, the system assumes the first byte of the first control section is the
entry point.
The ENTRY statement is coded as
ENTRY SUB1– Execution begins at SUB1.
INCLUDE statement specifes additional sources of linkage editor input to be included. It is often used
to include an old load module when subroutines within it must be recompiled and link edited. The
linkage editor first porcesses the new subroutine and then includes all the old load module except the
replaced subroutines.
It can be coded in two ways
INCLUDE ddname, ddname… for PS data set
INCLUDE ddname(memebr..member),… -> for PDS
Eg: INCLUDE INPUT1,DD1
INCLUDE DD2(ONE,TWO),INPUT1
LIBRARY statement names control sections to be looked up in libraries other than that specified in
SYSLIB DD statement.
LIBRARY ddname(member,member)
LIBRARY (name)  No automatic call lookup takes place for the named control section. For example
a subroutine in a library might be referred to in a program but might not be called during a particular
run. Since the subroutine will not be called
LIBRARY *(name..) External references to go unresolved for the entire life of the load module.
Eg: LIBRARY DD1(SUB1,SUB2),(HALT),*(ALTO) SUB1,SUB2 are looked up in the library
described in DD1 DD statement. No automatic subroutine lookup is made for HALT and ALTO.
INCLUDE statement – Example

//SYSIN DD *
INCLUDE CSQSTUB(CSQBSTUB)
NAME GETFRDB1(R)
/*

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 80
anytime, anywhere!

INCLUDE statement – Example – Notes


NAME Statement marks the end of a load module, It permits several load modules to be
produced by a single link edit step. Several subroutine can be compiled together.
To add NAME name
To Replace NAME name (R)
Eg: NAME PRG1 PRG1 is added
NAME PRG2 (R)  PRG2 is replaced.

REPLACE statement replaces one control section wit another or deletes a control section.

REPLACE old-name(new-name) the old name is replaced by new name


REPLACE name  deletes the control section with name.

Eg: REPLACE PRG2(PRG4)


INCLUDE DD1
- PRG2 is replaced by the control section described by the DD1 DD statement. The new
control section is named SUB4.

REPLACE PRG6  PRG6 control section is deleted.

PAGE statement aligns a control section on a 4k page boundary


ORDER statement reorders the control sections in a load module.
The LOADER

• The loader performs all the functions of the linkage editor

except for producing a load module.

• The advantage of the loader is it saves half the cost of

the linkage editor step.


© Infosys Technologies Ltd.
• It creates the executable program in virtual storage.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 81
anytime, anywhere!

The LOADER – Notes


The loader performs all the functions of the linkage editor except for producing a load
module.
The advantage of the loader is it saves half the cost of the linkage editor step.
It creates the executable program in virtual storage.
Checkpoint/Restart

• A restart can be
– Automatic (system restarts automatically)
– Deferred ( make changes before resubmitting)
• A Job can be restarted by two methods
– Restarting from a step
– Restarting from a Checkpoint
© Infosys Technologies Ltd.

• Restart is specified by RD parameter on EXEC


statement.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 82
anytime, anywhere!

Checkpoint/Restart – Notes
MVS allow programs that abnormally terminate, or even those that run to completion, to be
restarted so that the entire job does not need to be rerun in the event of an error.
There are two methods of restarting a job Restarting from a step and restarting from a
checkpoint.

A restart can be automatic or deferred. The restart is specified by using RD parameter on


the EXEC statement.
Checkpoint (1 of 2)

• Checkpoint consist of a snapshot of a program's status at


selected points during execution.
• Checkpoints are expensive, complex and require careful
planning.
• Checkpoints are used for protection against hardware,
OS and operator errors and© Infosys
not for Application Program
Technologies Ltd.

errors.
• Checkpoint makes restarting difficult.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 83
anytime, anywhere!

Checkpoint (1 of 2) – Notes
Checkpoints consist of a snapshot of a program’s status at selected points during execution.
Check pointing is done because of the potential cost or time limitations of restarting a large
job. Checkpoints are expensive, complex and require careful planning. Checkpoints are
used for protection against hardware, OS and operator errors and not for Application
Program errors.

When a checkpoint is taken, the system notes the position of each data set that is open, but
does not copy it. This can make restarting from a checkpoint difficult. If a dataset is
updated in place after the checpoint is taken, it will not be returned to its original status for
the restart.
Checkpoint (2 of 2)
• A DD statement is included in the step to specify the data
set to contain the checkpoints.
• In PS dataset , DISP=OLD rewrites the checkpoint where
as DISP=MOD writes each new checkpoint beyond the
previous.
• In PDS dataset, each checkpoint is added as a member.

//STEP1 EXEC PGM=READPGM


© Infosys Technologies Ltd.
//OUT DD DSN=TXXXX.JCL.PS,DISP=(NEW,KEEP),
UNIT=TAPE,VOL=SER=Z0001, CHKPT=EOV
//SYSCHK DD
DSN=TXXXX.CHKP.PS,DISP=(MOD,CATLG),UNIT=TAPE

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 84
anytime, anywhere!

Checkpoint (2 of 2) – Notes
Several check points can be taken during the execution of the job step. A DD statement is
included in the step to specify the data set to contain the checkpoints. For sequential data
sets DISP=OLD rewrites the previous checkpoints. DISP=MOD writes each new checkpoint
beyond previous. In case of PDS each checkpoint is added as a member.

Coding CHKPT=EOV on DD statement specifies that checkpoint is taken when the end of
volume is reached.
Automatic Restart Definition (1 of 3)
• The RD parameter on the JOB or EXEC statement controls
automatic restart and suppress checkpoint restart.
• The syntax for the parameter is
RD=R/NC/NR/RNC

Restart conditions Automatic Restart Suppress


CHKPT
R - Restart Yes No

NC-No checkpoint No© Infosys Technologies Ltd. Yes

NR- No Automatic No No
Restart
RNC-Restart and No Yes Yes
Checkpoint

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 85
anytime, anywhere!

Automatic Restart Definition (1 of 3) – Notes


The RD parameter on the JOB or EXEC statement controls automatic restart and suppress
checkpoint restart.
The syntax for the parameter is
RD=R/NC/NR/RNC
Automatic Restart Definition (2 of 3)
• RD on EXEC statement
• Example
//STEP1 EXEC PGM=PRG1, RD=R

– STEP1 may be automatically restarted.

• Example
© Infosys Technologies Ltd.
// STEP2 EXEC COB2,RD=RNC

– Automatic restart is permitted in each step of the


procedure COB2.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 86
anytime, anywhere!

Automatic Restart Definition (2 of 3) – Notes

RD on EXEC statement
Example
STEP1 may be automatically restarted.
Example
Automatic restart is permitted in each step of the procedure COB2.
Automatic Restart Definition (3 of 3)

• RD on JOB statement

• Example

//INFY10J JOB ,,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,RD=R

– All steps within the job may be automatically restarted.

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 87
anytime, anywhere!

Automatic Restart Definition (3 of 3) – Notes

RD on JOB statement
All steps within the job may be automatically restarted.
Deferred Restart – STEP Restart
• A deferred restart form a job step begins execution at a
specific step within the job, bypassing all preceding
steps.
• Things to be noted for STEP Restart
– Datasets are not passed from previous steps.
– Refer backs cannot be used except in DCB, DSN and
VOL parameters.
– New datasets created in© the previous run are still in
Infosys Technologies Ltd.
existence.
– Temporary data sets passed from a previous step is
deleted, so restart from the step that created the
dataset.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 88
anytime, anywhere!

Deferred Restart – STEP Restart – Notes


A deferred restart form a job step begins execution at a specific step within the job,
bypassing all preceding steps.
Things to be noted for STEP Restart
Datasets are not passed from previous steps since previous steps are not executed.
Refer backs cannot be used except in DCB, DSN and VOL parameters.
New datasets created in the previous run are still in existence. Attempts to recreate them
may cause the job to fail because there are duplicate datasets on the same volume.
Temporary data sets passed from a previous step is deleted, so restart from the step that
created the dataset.
STEP Restart
• STEP restart on JOB statement
• Example
//INFY01J JOB ,,CLASS=ANOTIFY=&SYSUID,RESTART=STEP3

– Execution resumes at step3

• Example
© Infosys Technologies Ltd.
//INFY01J JOB
,,CLASS=ANOTIFY=&SYSUID,RESTART=STEP1.COB2
– Execution resumes at the STEP1 step in COB2
Cataloged procedure.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 89
anytime, anywhere!

STEP Restart – Notes

STEP restart on JOB statement


Checkpoint Restart

• In addition to STEP restart checkpoint can also be used


for restart.
• All the dataset required by the JOB must be available
before the restart because the checkpoint does not save
the Datasets.
RESTART=(STEPNAME,CHECKID) Restart from a
checkpoint © Infosys Technologies Ltd.

RESTART=(STEPNAME.PROCNAME.CHECKID) Restart from a


checkpoint within a step within a cataloged procedure
RESTART=(*.CHECKID) Restart from first step
checkpoint

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 90
anytime, anywhere!

Checkpoint Restart – Notes


In addition to STEP restart checkpoint can also be used for restart.
All the dataset required by the JOB must be available before the restart because the
checkpoint does not save the Datasets.
DATASET Protection
• RETPD,EXPDT: Retention Checks
• A retention period can be assigned to data sets.
• A dataset cannot be modified or deleted after expired
date or retention period.
• A RETPD parameter on DD statement requests a
reteintion period in days.
//ddname DD RETPD=days
• An EXPDT parameter can ©request a specific
Infosys Technologies Ltd. expiration
date
//ddname DD EXPDT=yyddd
• EXPDT must be specified in YYYY/DDD format.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 91
anytime, anywhere!

DATASET Protection – Notes


A retention period can be assigned to datasets on tape or DASD volumes. A data set with
an unexpired retention date cannot be modified or deleted.

A RETPD parameter on a DD statement requests a retention period in days .


// ddname DD RETPD=days
Alternatively, and EXPDT parameter can request a specific expiration date.
//ddname DD EXPDT=yyddd
Retention periods are assigned when the data set is created but they can be changed or
removed later in any job step that opens the data set , by coding LABEL parameter.
Example //STEP1 DD LABEL=(,,,EXPDT=09240)
PASSWORD Protection
• The PASSWORD sub parameter, coded when the data
set is created, indicates that a password is needed to
open or delete the data set.
• If NOPWREAD is specified, the data set can be read, but
the password must be supplied to write or delete the data
set.
• To request the data set to be protected by password,
© Infosys Technologies Ltd.
code LABEL=(,,PASSWORD)
• PASSWORD and NOPWREAD are positional
parameters.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 92
anytime, anywhere!

PASSWORD Protection – Notes


The PASSWORD sub parameter, coded when the data set is created, indicates that a
password is needed to open or delete the data set.
If NOPWREAD is specified, the data set can be read, but the password must be supplied to
write or delete the data set.
The system assigns an eight-digit password when the data set is created. The operator, or
in TSO the user, must supply the password whenever the dataset is used. If the correct
password is not given in tow tries, the job is cancelled.
Example //STEP1 DD LABEL=(,,NOPWREAD,EXPDT-09200)
RACF Protection

• Resource Allocation Control Facility is an IBM program


product that limits access to data sets residing on DASD
volumes.
• It provides list of users that have access to data set,
along with the type of access they have.
• A data set may be given RACF protection either
© Infosys Technologies Ltd.

automatically when it is created or through the RACF


command language.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 93
anytime, anywhere!

RACF Protection – Notes


Resource Allocation Control Facility is an IBM program product that limits access to data
sets residing on DASD volumes.
It provides list of users that have access to data set, along with the type of access they have.
A data set may be given RACF protection either automatically when it is created or through
the RACF command language.
JCL to convert BMS map to HTML script

//INFBANGJ JOB
,,NOTIFY=&SYSUID,CLASS=B,MSGLEVEL=(1,1
//JOBPROC JCLLIB
ORDER=CICSTS23.CICS.SDFHPROC
//MAPASM EXEC DFHMAPT,
// MAPLIB='OPERN.CICS1.BMSLIB',
// DSCTLIB='OPERN.CICS1.COPYLIB',
// TEMPLIB='INFBANG.CICS.TEMPLIB',
© Infosys Technologies Ltd.
// MAPNAME=WMAP1
//COPY.SYSUT1 DD
DSN=INFBANG.WEB.APPL(WMAP1),DISP=SHR
/*

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 94
anytime, anywhere!

JCL to convert BMS map to HTML script – Notes


This JCL invokes a procedure DFHMAPT that converts BMS macros to 3 outputs namely
Physical map, symbolic map and HTML script.
Here in this JCL HTML script is placed in INFBANG.CICS.TEMPLIB.
DFHMAPT procedure

• This procedure invokes ASMA90 IBM provided


assembler program.

• SYSUT1 DD statement provides input (BMS macro) to


this Assembler program.

• If the HTML script has to be used in CICS region it has to


© Infosys Technologies Ltd.
be copied to CICSTS23.CICS.DFHHTML data set.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 95
anytime, anywhere!

DFHMAPT procedure – Notes

This procedure invokes ASMA90 IBM provided assembler program.

SYSUT1 DD statement provides input (BMS macro) to this Assembler program.

If the HTML script has to be used in CICS region it has to be copied to


CICSTS23.CICS.DFHHTML data set.
Sending e-mail using JCL
//STEP010 EXEC PGM=IEBGENER
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TEST.PARMCARD1,DISP=SHR
// DD DSN=TEST.PARMCARD2,DISP=SHR
//SYSUT2 DD SYSOUT=A,OUTPUT=MP.SMTP
//SYSIN DD DUMMY

TEST.PARMCARD1:
This parmcard will have details about to and from email id .
HELLO MP
© Infosys Technologies Ltd.
MAIL FROM XXX@INFOSYS.COM
RCPT TO: YYY@INFOSYS.COM
DATA
SUBJECT: THIS IS THE NOTIFICATION EMAIL
FROM : EMAIL TEAM
TO : EMPLOYEES OF INFOSYS

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 96
anytime, anywhere!

Sending e-mail using JCL – Notes


Using IEBGENER utility e-mail can be sent to recipients.

96
JCL Utilities

• IBM Utility Programs

– IEBUPDTE

– IEBDG

– IEBPTPCH

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 97
anytime, anywhere!

JCL Utilities – Notes

IBM Utility Programs

IEBUPDTE

IEBDG

IEBPTPCH
IEBUPDTE Program (1 of 2)

• Purpose: To edit and maintain partitioned data sets.


• The SYSIN input for IEBUPDATE includes four control
statements
– ADD / CHANGE/ REPLACE statement

./ ADD NAME= name [,LIST=ALL]


./ CHANGE NAME= name
© Infosys [,LIST=ALL]
Technologies Ltd.

./ REPL NAME= name [,LIST=ALL]

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 98
anytime, anywhere!

IEBUPDATE PROGRAM – Notes

IEBUPDATE is designed to edit and maintain partitioned data sets. It was developed before
online terminals and TSO/ISPF were in use.

The SYSIN input for IEBUPDATE includes four control statements:


ADD/CHANGE/REPLACE,NUMBER,DELETE and ENDUP.

ADD statement instructs IEBUPDATE to create a new member using the data that follows.

CHANGE statement tells that data records that follow are to replace existing records in the
specified member

REPLACE statement directs to replace the specified member with the data records that
follow in the input stream.
IEBUPDATE Program (2 of 2)

– NUMBER statement
./ NUMBER [SEQ1={number/ALL}]
[,SEQ2=number]
[,NEW1=number]
[,INCR=number]
[,INSERT=YES]

© Infosys Technologies Ltd.


– DELETE statement
./ DELETE SEQ1=number,SEQ2=number

– ENDUP statement

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 99
anytime, anywhere!

IEBUPDATE PROGRAM – Notes

NUMBER statement tells IEBUPDATE to insert sequence numbers in columns 73 to 80 of


new member. Both SEQ1 and SEQ2 give the sequence number of the card The sequence
number will start with 1000 and be incremented by 100 for each record. NEW1 specifies the
starting number for the updated member. INCR specifies the increment used when
renumbering records. INSERT=YES is specified to insert the records in the updated library.

ENDUP statement indicates the end of the control file.

DELETE statement lets IEBUPDATE to delete specific lines from a member. It is used
following a CHANGE statement that specifies the member it applies to.

All these statements are coded with a period in column1 and a slash in column2. this
distinguishes the control statements from any data in the control file.
IEBDG Program (1 of 3)

• Purpose: To create a sequential file that contains data


extracted from other files.
• IEBDG has four control statements:
– DSD (Data Set Definition)
– FD (Field Definition)
– CREATE
© Infosys Technologies Ltd.
– END

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 100
anytime, anywhere!

IEBDG PROGRAM – Notes

IEBDG is a data generator to create a sequential file that contains data extracted from other
files. The generated data can be created for each output record according to a pattern
provided. For example if a three-digit number field is given an initial value of zero and is
increased by one for each output record, the same procedure is followed.

It contains four different control statements: DSD,FD, CREATE and END.

In DSD statement, the OUTPUT parameter names the data set used.

FD statement is used to define the data that will appear in each output record.

CREATE statement is to generate records in the output file.


IEBDG Program (2 of 3)
• DSD statement

DSD OUTPUT=(ddname) [,INPUT=(ddnames)

OUTPUT ddname of the output file


INPUT ddname of the input file
• FD statement
FD NAME=name,
LENGTH=length,© Infosys Technologies Ltd.
FORMAT=pattern
PICTURE=length
ACTION=action
INDEX=number,
FILL=character
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 101
anytime, anywhere!

IEBDG PROGRAM – Notes

In the DSD statement, the OUTPUT parameter names the data set used; in this case, the
output file is defined by the OUTDD dd statement. IF data were copied from one or more
input files, the DSD statement would include an INPUT parameter as well.

A FD statement consist of

Name parameter which associates a name with the data field.

Length specifies the length of the field.

FORMAT parameter specifies IBM supplied data format such as AN (alphanumeric) AL


(Alphabetic) ZD (Zoned Decimal) PD (Packed Decimal) BI (Binary) CO (Collating sequence
– Special characters).

PICTURE specifies a user-supplied picture. Length is the number of characters between the
quotes.

ACTION specifies what action is to be applied to the field for each record.

INDEX specifies a number that is added to the field for each record.

FILL specifies a single-character alphanumeric literal to fill this field in each output record.
IEBDG Program (3 of 3)
• CREATE Statement

CREATE QUANTITY=number,
[ , INPUT=ddname]
[, FILL=character]
[,NAME=name]

© Infosys Technologies Ltd.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 102
anytime, anywhere!

IEBDG PROGRAM – Notes

CREATE statement tells IEBDG to generate records in the output file.

The parameter of CREATE statement are discussed below

QUANTITY specifies the number of records to be generated.

INPUT specifies an input file from which records are read and used as the basis for
modification by fields selected with the NAME parameter. IF omitted, records are created by
IEBDG and filled with the character specified in FILL.

FILL specifies a single-character alphanumeric literal to fill undefined character positions in


each output record.

NAME Names one or more fields defined in FD statements that are used to build the output
record.
IEBPTPCH Program
• Purpose: To produce a formatted listing of a data set.
• IEBPTPCH requires four DD statements
– SYSPRINT – defines output message file
– SYSUT1 – defines the input file
– SYSUT2 – defines the output file
– SYSIN – control statement with at least PRINT or
PUNCH statement.
© Infosys Technologies Ltd.
• PRINT statement prints input file in groups of eight
characters.
• PUNCH statement prints without the annoying eight-
character groupings used by the PRINT statement.
We enable you to leverage knowledge
© 2010 - 2011, Infosys Ltd. Confidential 103
anytime, anywhere!

IEBPTPCH PROGRAM – Notes

IEBGENER program copies a file to a SYSOUT data set, the resulting output is completely
unformatted. To produce a formatted listing of a data set, IEBPTPCH with Print/punch utility
is used.

Unlike IEBGEBNE, IEBPTPCH requires at least one control statement via SYSIN DD
statement. At the minimum, the SYSIN input stream should contain either a PRINT or
PUNCH statement.

The PRINT statement is the primary control statement for IEBPTPCH. It must be the first
statement in the SYSIN file. It is coded like PRINT.

When PRINT is used without parameters, data from the input file is printed in groups of eight
character with each group separated by two blanks. Up to 112 characters can be printed on
one line. If the input record contains more than 112 characters, the data is wrapped to
additional lines.

PUNCH statement is still useful for printing files without the annoying eight-character
groupings used by the PRINT statement.
Summary

• DD statement parameter
• Storage Management Subsystem
• JES2 and JES3 subsystems and System Display and
Search Facility
• Other ways of submitting jobs
• JCL behind Z/OS sub systems
© Infosys Technologies Ltd.

• Miscellaneous features in JCL

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 104
anytime, anywhere!

Summary – Notes
These are the points that we discussed in the presentation.
References
• Gary DeWard Brown, JCL Programming Bible (with
z/OS) fifth edition, Wiley India Dream Tech, 2002.
• Doug Lowe, MVS JCL, Mike Murach and Associates,
1994.
• IBM Manual, z/OS V1R4.0 MVS JCL Reference, SA22-
7597-06.
• IBM Manual, z/OS V1R4.0 MVS JCL User Guide, SA22-
7598-04.
© Infosys Technologies Ltd.
• IBM Manual, z/OS Basic Skills Information Center: z/OS
Concepts.

We enable you to leverage knowledge


© 2010 - 2011, Infosys Ltd. Confidential 105
anytime, anywhere!

References – Notes
For additional information and further reading please refer to the artifacts / links listed here.
Thank You

ER/CORP/CRS/OS86/003 Confidential © 2010 - 2011, Infosys Ltd.

106

You might also like