Using generation data groups

A cataloged data set that is frequently updated, such as a weekly payroll, can be grouped with its earlier generations to form a named generation data group. To learn more, see Processing generation data groups.

Create a generation data group

With ZOAU, you can create a generation data group called ${prefix}.GDG that has a limit of 255 generations in the following ways:

Issuing a shell command:

dtouch -tGDG -L255 ${prefix}.GDG


Calling an API in python programs:

gdgs.create("%s.GDG" % HLQ, 255)


Without ZOAU, to achieve the same purpose, you need to write the following JCL statements:

//GDGTCH   EXEC   PGM=IDCAMS
//SYSPRINT DD     SYSOUT=A
//SYSIN    DD     *
    DEFINE GENERATIONDATAGROUP (NAME(@@HLQ@@.GDG) LIMIT(255))


List the active generation data sets in a generation data group

With ZOAU, you can list the details of the active generation data sets from a generation gata group named ${prefix}.GDG in the following ways:

Issuing a shell command:

dls -tGDS -l '${prefix}.GDG.*'


Calling an API in Python programs:

gdg = gdgs.GenerationDataGroupView("%s.GDG" % HLQ)
print(gdg.generations())


Delete a generation data group

With ZOAU, you can delete a generation data group called ${prefix}.GDG in the following ways:

Issuing a shell command:

drm -F "${prefix}.GDG"


Calling an API in Python programs:

gdgs.GenerationDataGroupView("%s.GDG" % HLQ).delete()


Without ZOAU, to achieve the same purpose, you need to write the following JCL statements:

//RMGDG    EXEC   PGM=IDCAMS
//SYSPRINT DD     SYSOUT=*
//SYSIN    DD     *
    DELETE (@@HLQ@@) GENERATIONDATAGROUP