11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A GDS has sequentially ordered absolute and relative names that represent its age. The<br />

catalog management routines use the absolute generation name in the catalog. Older data<br />

sets have smaller absolute numbers. The relative name is a signed integer used to refer to the<br />

most current (0), the next to most current (-1), and so forth, generation. See also 4.20,<br />

“Absolute generation and version numbers” on page 141 and 4.21, “Relative generation<br />

numbers” on page 142 for more information about this topic.<br />

A generation data group (GDG) base is allocated in a catalog before the GDS’s are<br />

cataloged. Each GDG is represented by a GDG base entry. Use the access method services<br />

DEFINE command to allocate the GDG base (see also 4.19, “Defining a generation data<br />

group” on page 139).<br />

The GDG base is a construct that exists only in a user catalog, it does not exist as a data set<br />

on any volume. The GDG base is used to maintain the generation data sets (GDS), which are<br />

the real data sets.<br />

The number <strong>of</strong> GDS’s in a GDG depends on the limit you specify when you create a new<br />

GDG in the catalog.<br />

GDG example<br />

In our example in Figure 4-26 on page 137, the limit is 5. That means, the GDG can hold a<br />

maximum <strong>of</strong> five GDSs. Our data set name is ABC.GDG. Then, you can access the GDSs by<br />

their relative names; for example, ABC.GDG(0) corresponds to the absolute name<br />

ABC.GDG.G0005V00. ABC.GDG(-1) corresponds to generation ABC.GDG.G0004V00, and<br />

so on. The relative number can also be used to catalog a new generation (+1), which will be<br />

generation number 6 with an absolute name <strong>of</strong> ABC.GDG.G0006V00. Because the limit is 5,<br />

the oldest generation (G0001V00) is rolled-<strong>of</strong>f if you define a new one.<br />

Rolled in and rolled <strong>of</strong>f<br />

When a GDG contains its maximum number <strong>of</strong> active generation data sets in the catalog,<br />

defined in the LIMIT parameter, and a new GDS is rolled in at the end-<strong>of</strong>-job step, the oldest<br />

generation data set is rolled <strong>of</strong>f from the catalog. If a GDG is defined using DEFINE<br />

GENERATIONDATAGROUP EMPTY and is at its limit, then when a new GDS is rolled in, all the<br />

currently active GDSs are rolled <strong>of</strong>f.<br />

The parameters you specify on the DEFINE GENERATIONDATAGROUP IDCAMS command determine<br />

what happens to rolled-<strong>of</strong>f GDSs. For example, if you specify the SCRATCH parameter, the GDS<br />

is scratched from VTOC when it is rolled <strong>of</strong>f. If you specify the N<strong>OS</strong>CRATCH parameter, the<br />

rolled-<strong>of</strong>f generation data set is re-cataloged as rolled <strong>of</strong>f and is disassociated with its<br />

generation data group.<br />

GDSs can be in a deferred roll-in state if the job never reached end-<strong>of</strong>-step or if they were<br />

allocated as DISP=(NEW,KEEP) and the data set is not system-managed. However, GDSs in<br />

a deferred roll-in state can be referred to by their absolute generation numbers. You can use<br />

the IDCAMS command ALTER ROLLIN to roll in these GDSs.<br />

For further information about generation data groups, see z/<strong>OS</strong> DFSMS: Using Data Sets,<br />

SC26-7410.<br />

138 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!