- You are only allowed to have one version (V00-V99) per generation (G0001 - G9999) for a GDG
- When a new VERSION of an existing generation is created, the older version is deleted rather than kept.
- To catalog a version number other than V00, you must use an absolute generation and version number.
- The maximum number of generations that you can associate with a base is 255
- For a GDG base, the maximum length is 35. For all other dsnames, the maximum length is 44.
For an existing GDG with version 00 for e.g. TST5.AAA.TEST.GDG.G0001V00 if a new version is created i.e. TST5.AAA.TEST.GDG.G0001V01 the older version i.e. V00 will be deleted automatically.
NOEMPTY means that when the 30 generation limit is reached, the oldest will be deleted, but all the others will be retained.
EMPTY means that when the limit is reached, all the 30 current files will be deleted and the process will start again with the new file.
SCRATCH means uncatalog and delete files when they exceed the generation limit. You could code
NOSCRATCH which means just uncatalog old generations but do not delete them.
One last thing.
If you just use 'D' against a 3.4 file listing the delete will fail with the error 'GDG base or VSAM file'. If you use the IEFBR14 program with your file name and DISP=(OLD,DELETE) coded you will get a 'dataset not found' JCL error.
There are two ways to do it
Use 'DEL' against a 3.4 file listing
Use IDCAMS with DELETE file.name PURGE in the control statements
Nice stuff
ReplyDelete