GDG – GENERATION DATA GROUP
a concept in the mainframe that allows organizing and
managing datasets or files over the time.
These are a group of datasets that are logically related
(with the same attributes like format and record length) to each other from the
process and usage point of view.
All datasets (generation) within GDG share the same name
except the last qualifier, which is a combination of the generation number and
version number.
The same name is called as "GDG Base", and
the remaining datasets with a different qualifier at the end are called as
"GDG Files or GDG Generations".
At any point, a GDG can have a maximum of 255 generations.
CREATE A GDG BASE |
CREATE A PS IN A GDG BASE
OR VERSIONS IN A GDG BASE |
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * DEFINE GDG ( NAME (WORK.FIRST.GDG1) – LIMIT(3) - NOEMPTY - SCRATCH ) /* // |
//STEP01 EXEC PGM=IEFBR14 //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //DD1 DD DSN= WORK.FIRST.GDG1(+1), DISP=(NEW,CATLG,DELETE), DCB=(DSORG=PS,RECFM=FB, LRECL=80,BLKSIZE=800), SPACE=(TRK,(1,1),RLSE), UNIT=SYSDA |
TO ALTER A GDG BASE |
TO DELETE A GDG BASE |
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * ALTER WORK.FIRST.GDG1 LIMIT(10) /* |
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * DELETE WORK.FIRST.GDG1 FORCE /* |
TO DELETE A GDG CURRENT
VERSION |
TO DELETE A GDG PREVIOUS
VERSION |
//STEP01 EXEC PGM=IEFBR14 //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //DD1 DD DSN=WORK.FIRST.GDG1(0), DISP=(OLD,DELETE,DELETE) |
//STEP01 EXEC PGM=IEFBR14 //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //DD1 DD DSN=WORK.FIRST.GDG1(-5), DISP=(OLD,DELETE,DELETE) |
COPY PS TO GDG GENERATIONS |
COPY PS TO PREVIOUS
VERSION IN GDG |
//STEP01 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //SYSUT1 DD DSN= WORK.FIRST.FILE1,DISP=SHR //SYSUT2 DD DSN= WORK.FIRST.GDG1(+1), DISP=(NEW,CATLG,DELETE), DCB=(DSORG=PS,RECFM=FB, LRECL=80,BLKSIZE=800), SPACE=(TRK,(1,1),RLSE), UNIT=SYSDA //SYSIN DD DUMMY |
//STEP01 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //SYSUT1 DD DSN= WORK.FIRST.FILE1, DISP=SHR //SYSUT2 DD DSN= WORK.FIRST.GDG1(-1), DISP=SHR //SYSIN DD DUMMY OR to current version //SYSUT2 DD DSN= WORK.FIRST.GDG1(0), |
No comments:
Post a Comment