z/OS MVS JCL User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Generation data sets

z/OS MVS JCL User's Guide
SA23-1386-00

A generation data set is one of a collection of successive, historically related, cataloged data sets, known as a generation data group (GDG). The system keeps track of each data set in a generation data group as it is created, so that new data sets can be chronologically ordered and old ones easily retrieved.

This topic describes both SMS-managed and non-SMS-managed generation data sets.

Note: A VSAM data set cannot be a generation data set.

To create or retrieve a generation data set, follow the generation data group name in the DD statement DSNAME parameter with a relative generation number. When you catalog the generation data set, the operating system uses that number to construct a four-digit absolute generation number and a two-digit version number, resulting in a number of the form G0000V00 to represent that generation. The G0000V00 number must be unique within the GDG so that the system can sort the data sets into the correct chronological sequence unambiguously.

WARNING: IBM® strongly recommends that you specify a new generation by a relative generation number (and allow the system to compute the G0000V00 number). This avoids the possibility of creating a generation number that exceeds 9000 for any data set in the GDG, which might cause an ambiguity regarding the correct chronological order. This could happen, for example, if you specified a fully-qualified name and used the first two digits of the number to represent the year. If, however, you must specify a fully-qualified G0000V00 name, you should include a DD statement for the GDG base name, to provide data set integrity on that base.

For information about generation numbers, see z/OS DFSMS Using Data Sets.

Relative generation numbers: When creating a generation data set, the relative generation number tells the system whether this is the first data set being added during the job, the second, the third, etc. When retrieving a generation data set, the relative generation number tells the system how many data sets have been added to the group since this data set was added.

The first time you use a relative generation number for a generation data group within a job, the system establishes the relationship between the relative generation number and the absolute generation number. The system maintains this relationship throughout the job.

For example, if you create a generation data set with a relative generation number of (+1), the system recognizes any subsequent reference to (+1) throughout the job as having the same absolute generation number.

Relative generation numbers are obtained from the catalog as it existed:
  • For JES2, at the beginning of the first step that specifies the generation data set by relative generation number.
    Note: In a shared DASD environment, if two or more jobs running on different systems simultaneously create new generations of the same data set, one of the jobs could fail with a JCL error.
  • For JES3, when the job is set up, and again by the system at the beginning of the first step that specifies the generation data set by relative generation number. If the most recent data set is not the same at both times, the results are unpredictable.

Types of SMS-managed data sets in a GDG: An SMS-managed generation data group (GDG) can consist of cataloged sequential and direct data sets residing on direct access volumes. Generation data sets in a GDG can have like or unlike data set attributes and data set organizations. If a GDG is created on an SMS-managed volume, any dependencies on a model data set label in order to allocate a new generation data set should be removed. A GDG can contain both SMS-managed and non-SMS-managed generation data sets.

Types of non-SMS-managed data sets in a GDG: A non-SMS-managed generation data group (GDG) can consist of cataloged sequential and direct data sets residing on tape volumes, direct access volumes, or both. Generation data sets in a GDG can have like or unlike DCB attributes and data set organizations.

Retrieval of GDG Data Sets: All generations of a generation data group can be retrieved together as a concatenation of data sets. The retrieval order can be specified: refer to Retrieving a generation data set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014