Вы находитесь на странице: 1из 8

4.

4 GENERATION DATA GROUPS(GDGs)


Why. Think of one application in regular production where the output of Monday's run
becomes the input to
Tuesday's run and so on. The JCL would work on Monday but on Tuesday DSN
parameters must be changed.
Using Gags, JCL can remain unchanged while the data set names change with every
execution.
I. Group of data sets that are chronologically or functionally related.
Processing
I. Adding a new generation.
II. Retaining the previous generation.
III. Discarding the oldest generation.
4.4.1 NAMING CONVENTION
ABSOLUTE
NAME
RELATIVE
NAME
CHRONOLOGICAL
ORDER
GEN.G0006V00 GEN(0) CURRENT
GEN.G0005V00 GEN(-1)
GEN.G0004V00 GEN(-2) OLDEST
I. Dsname - Group name
II. Gnnnn - Absolute generation number ( 0000 to 9999 )
III. Vnn - Version of that generation. (00 to 99)
Infosys Introduction to VSAM, GDG and SMS
ER/CORP/CRS/OS02/002 Ver 3.00 Page 63 of 66
Copy if Printed
4.4.2 ALLOCATE GDG BASE
Defines to the catalog the existence of the GDG and the number of generations allowed.
Does not allocate a model DSCB.
Example:
//DEFGDG EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DEFINE GDG -
(NAME(ADMVS.SMPLGDG.BASE)-
SCRATCHNOEMPTYLIMIT(
10))
/*
4.4.3 DEFINE MODEL DSCB
Defines a model such that new GDGs created will consistently use the prespecified
parameters.
These parameters are DCB and EXPDT.
The model data set must be cataloged.
Example:
//INFENR EXEC PGM=IEFBR14
//GDG01 DD DSN=ADMVS.SMPLMODEL,DISP=(,KEEP)
// UNIT=SYSDA,SPACE=(TRK,(0)),
// VOL=SER=EDPAKx,
. // DCB=(LRECL=....,RECFM=....,BLKSZ=....)
4.4.4 CREATE GDG
//INFENR EXEC PGM=IEFBR14
//GDG01 DD DSN=ADMVS.SMPLGDG.BASE(+1),DISP=(NEW,CATLG)
// SPACE=(TRK,(....)),VOL=SER=....,
// UNIT=SYSDA,DCB= ADMVS.SMPLMODEL
4.4.5 DELETE GDG CATALOG ENTRIES
• Deletes a model ( undoes a define model )
//INFENR EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DELETE ADMVS.SMPLMODEL PURGE
/*
• Deletes a GDG entry ( undoes an allocated GDG and deletes all GDGs )
//INFENR EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE ADMVS.SMPLGDG.BASE PURGE FORCE
/*
Infosys Introduction to VSAM, GDG and SMS
ER/CORP/CRS/OS02/002 Ver 3.00 Page 64 of 66
Copy if Printed
4.5 STORAGE MANAGEMENT SUBSYSTEM.
4.5.1 What is SMS?
SMS is an optional feature of MVS. It is a tool that is used to improve the management of
available disk space.
Datasets created in SMS are known as SMS managed datasheet. PDS are known as
PDSE. Under SMS while
creating dataset one need to specify
STORCLASS instead of UNIT
DATACLASS instead of DCB & SPACE
MGMTCLASS for migration of datasets.
SMS is a name loosely used to refer to three related but different things:
• the concept of system-managed storage ,
• the DFSMS product itself , and
• The Storage Management Subsystem as implemented, involving DFSMS and support
utilities.
Although DFSMS (Data Facility Storage Management Subsystem) runs as part of
MVS/ESA, other major utility
subsystems are essential for its operation. These include DFHSM (Data Facility
Hierarchical Storage Management),
DFDSS (Data Facility Data Set Services), and ISMF (Interactive Storage Management
Facility). DFHSM and
DFDSS can be used either with or without SMS. The actual name of the SMS software
product is IGDZILLA.
Following IBM’s convention for identifying messages produced by its software, you will
find the letter IGD
prefacing any messages SMS issues. For example, new messages that will begin to
appear in your MVS/ESA
system reporting such as the following are generated by IGDZILLA, SMS:
IGD104I CSCJGJ.ADV.SHRSMS RETAINED, DDNAME=SHRSMS
4.5.2 Why SMS
SMS takes time, energy and expense to install. There are many reasons why an
Installation may choose to
commit the resources to install it. One compelling reason to implement SMS is the desire
to give MVS/ESA
greater control of data set management. This increased control can produce more efficient
& reliable use of
system resources, provide better custodianship of the vast quantities of data on a
mainframe, and, in a long run,
makes JCL coding simpler.
In addition, SMS moves towards the goal of supporting vastly different types of Disk and
optical storage, such as
RAID (redundant array of inexpensive disks) that is now appearing on the horizon. These
new forms of storage will
present different storage formats that it would be unproductive to deal with directly. SMS
is a buffer being set in
place to shield and insulate applications from the potentially complex and changing
hardware underbelly of
mainframe data storage.
A major goal of SMS is to isolate logical data set requirements from physical ones, as
much as possible, and
thereby free programmers from some of the decisions and burdens associated with data
set creation. Coding
requirements from which you may be relieved include the need to code a new data set’s
block size, the need to
explicitly code data set allocation attributes such as LRECL, RECFM, and SPACE, and
the need to code UNIT and
VOL=SER for new disk data sets. Simply stated, SMS allows you to think about logical
requirements for data
storage, and lets the system worry about the physical arrangements needed to meet your
logical requirements.
Infosys Introduction to VSAM, GDG and SMS
ER/CORP/CRS/OS02/002 Ver 3.00 Page 65 of 66
Copy if Printed
Another goal of SMS is to allow MVS/ESA to manage the back up,migration, and
expiration of data sets based
upon criteria assigned to each data set when it is created. Finally, performance and
availability levels are associated
with each system –managed data set when it is created.
All of these goals can be achieved for each system-managed data set. When Storage
Management Subsystem
is installed and activated on your system, it introduces a number of significant changes
that affects how data
sets are created and managed, it cause changes in your JCL, and it causes changes for
other related mainframe
software. If you code JCL you need to know about SMS and the changes that result from
its advent.
4.5.3 What SMS Manages
SMS manages individual disk data sets. Existing components of MVS/ESA have always
managed disk
resources as a whole, by keeping track of disk space use and availability, and the
MVS/ESA system catalog is
oriented to managing the entire disk resources of the computer system. SMS, on the other
hand, gets down to
the level of individual data sets, and, depending on various specifications it has been
given about them, can treat
different data sets quite differently. When SMS is installed, your systems programmers
give it. Over time, it is
likely that SMS will be given control of an increasing number of volumes. When SMS is
fully implemented on
a system, you may find that nearly all disk volumes are controlled by it.
MVS/ESA determines whether a given data set is to be SMS-managed when the data set
is created; that is,
when you allocate a new disk data set. Data sets that are to be system-managed are
allocated to SMS-managed
disk volumes when created and are referred to as SMS-managed data sets; data sets that
are not systemmanaged
are called non-SMS-managed data sets.
4.6 SMS Operations.
• SMS manages disk data sets only.
• SMS manages sequential, partitioned, VSAM, VIO, temporary, and generation data
sets.
• SMS does not manage tape data sets, instream data, printed output, or ISAM data sets.
• With SMS the system, not the user, manages the location of system-managed data
sets.
• All system-managed data sets are catalogued when they are created and can not be
uncataloged unless they are
deleted.
• System-managed data sets can only be created on system-managed volumes.
• UNIT and VOL are not coded for system-managed data sets.
• Even DD statements used to create non-system-managed data sets can omit the UNIT
parameter, if your
installation has taken advantage of the SMS-provided capability to define a default
symbolic device group
name.
• Space for new disk data sets can be requested in terms of a data set’s average record
length using AVGREC.
• BLKSIZE can be omitted for new data sets, both disk and tape.
• Data set allocation attributes for new data sets, such as DCB and SPACE information,
can be coded by the user,
and obtained by the system, in several different ways.
• A new format of MVS-ESA allocation messages is generated in job output listings for
SMS-managed data sets.
• You can eliminate model data set control block (model DSCB) coding when
allocating generation data sets.
• Certain DISP parameter values are interpreted differently.
• You cannot avoid the system catalogue when accessing system-managed data sets; all
SMS data sets are
catalogued.
Infosys Introduction to VSAM, GDG and SMS
ER/CORP/CRS/OS02/002 Ver 3.00 Page 66 of 66
Copy if Printed
• JOBCAT and STEPCAT DD statements are not allowed.
• You can create VSAM data sets using JCL alone, and you can also create temporary
VSAM data sets.
Users can select the most appropriate back up, migration, and expiration criteria for
system-managed data sets when
they are created.
You may or may not have the latitude to choose whether SMS manages some or all of the
data sets your JCL
creates. A major new utility named DFDSS (Data Facility Data Set Services) can also
convert existing data sets to
SMS-managed status, or remove data sets from SMS management.
4.6.1 JCL STATEMENTS NOT AFFECTED BY SMS.
• JOB STATEMENTS
• EXEC STATEMENTS
• OUTPUT STATEMENTS
• DD STATEMENTS TO CREATE NON-SMS DADTASETS
• DD STATEMENTS USED WITH IN-STREAM DATA
• PROC STATEMENTS
4.7 Advantages and disadvantages of SMS.
Advantages are
• The user may not bother about resource allocation of data sets, as it is done by SMS.
• SMS provides the capability of concatenating data sets of unlike devices. For example
a tape data set can
be concatenated with disk data set.
• SMS managed datasets can not be deleted unless they are first uncataloged.
• VSAM data sets created in an SMS environment offer more flexibility.
The disadvantage is If SMS is used to request space for a DATASET where there is not
enough space, the JOB
will ABEND.
Infosys Appendix-A One complete JCL
ER/CORP/CRS/OS02/002 Ver 3.00 Page
Copy if Printed

JCL Interview Questions on Generation Data Group (GDG)


Q: What is a Generation Data Group (GDG)?
A: A generation Data Group is a group of chronologically or functionally
related datasets.
GDGs are processed periodically, often by adding a new generation,
retaining previous
generations, and sometimes discarding the oldest generation.
Q: How is GDG base created?
A: A GDG base is created in the system catalog and keeps track of the
generation
numbers used for datasets in the group. IDCAMS utility is used to
define the GDG base
for MVS/XA, and MVS/ESA. Older systems required that the IEHPROGM
utility be
used.
Q: What is model dataset label (Model DSCB)?
Q: What is the advantage in using generation data groups?
Q: How are GDG concatenated?
Q: How are different generations specified?
Q: What is the status of the GDG when an abend occurs?
Q: How is a previous GDG coded?
Q: How is the current GDG coded?
Q: How is a new GDG coded?1
Generation Data Sets

Generation data sets are a special form of catalogued data set. Several generations of a
data set are kept with the data set name varying only in the generation number.
Generation data sets may be retrieved and created using a generation number that is
relative to the latest catalogued generation prior to the start of the job. For example, the
latest catalogued generation may be referenced by specifying a zero in parentheses. The
previous generation may be specified by a minus one in parentheses. The first generation
created by this job may be referenced by a plus one in parentheses, the second generation
created by a plus two, and so forth.
+---------------------------------------------+
[ DSN=AM2P.BSL.TRANS(0) ]
[ DSN=AM1P.ADABAS.CLOG(-1) ]
[ DSN=AM3T.RSLS.MAST(+1) ]
[ DSN=AM1P.FM.KEY.MASTER(+2) ]
[ ]
[ Figure 79. Generation data sets ]
+---------------------------------------------+
Before creating a generation data set, have the Data Manager build a generation data
group base entry specifying the number of generations to be kept in the catalogue. The
Data Manager must also create and catalogue a model data set label, on the same volume
as the catalogue, to provide DSORG, RECFM, LRECL, and BLKSIZE information for
the generation data group.

It may be convenient for tape generation data sets to reserve a set of tapes with
contiguous tape numbers. At least five tapes should be used for this round robin. The
catalogue should have several more generations than there are tapes, even twice as many,
because it may become necessary to uncatalogue some generations at times.

There must be an extra DD statement in the job step that writes a new generation. This
DD statement will reference the data set that was last written on the tape on which you
are going to write the new generation. The relative generation number would be minus
nine for a set of ten tapes, or minus four for a set of five tapes. This technique will not
work for large data sets that require more than one tape volume.

+----------------------------------------------------------------------
------+
[ 0 1 1 2 2 3 3 4 4 5 5 6 6
7 ]
[ 12345678901234567890123456789012345678901234567890123456789012345678
9012 ]
[
]
[ //NEWMAST DD DSN=AM1P.CSIV.MAILING(+1),DISP=(NEW,CATLG,DELETE),
]
[ // UNIT=DISK,SPACE=(8460,(100,50),RLSE),
]
[ // DCB=(ISS.MODEL,RECFM=FB,LRECL=180,BLKSIZE=8460)
]
[
]
[ //DUMMY DD DSN=AM1P.GD.MASTER(-9),DISP=SHR
]
[ //INPUT DD DSN=AM1P.GD.MASTER(0),DISP=SHR
]
[ //OUTPUT DD DSN=AM1P.GD.MASTER(+1),DISP=(NEW,CATLG,DELETE),
]
[ // UNIT=AFF=DUMMY,VOL=REF=*.DUMMY,LABEL=(1,SL),
]
[ // DCB=AM1P.GD.MASTER
]
[
]
[ Figure 80. Disk and Tape generation data sets
]
+----------------------------------------------------------------------
------+

Вам также может понравиться