GDG
Generation Data Group
Enhanced Definition
A group of related sequential datasets organized chronologically, with each dataset called a generation. GDGs are useful for maintaining historical versions of files with automatic retention management.
Key Characteristics
-
- Chronological dataset organization
- Automatic generation numbering
- Retention limit enforcement
- Relative and absolute generation references
- Rolloff of oldest generations
-
GDG Structure:
- GDG Base: Catalog entry defining the group
- Generations: Individual datasets in the group
- Limit: Maximum number of generations to retain
-
Generation Naming:
- Relative: Reference to current (0) or previous (-1, -2, etc.)
- Absolute: Actual generation number (G0001V00)
- Creating New: Use (+1) to create next generation
-
GDG Base Attributes:
- LIMIT: Maximum generations (1-255 or 1-9999)
- EMPTY/NOEMPTY: Keep or delete generations when limit reached
- SCRATCH/NOSCRATCH: Delete or keep old generations on disk
- Extended: Support for more than 255 generations
-
//STEP1 EXEC PGM=MYPGM //INPUT DD DSN=PROD.DAILY.DATA(-1),DISP=SHR (Yesterday's data) //OUTPUT DD DSN=PROD.DAILY.DATA(+1), (Today's new gen) // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(10,5))
Use Cases
-
- Daily batch processing outputs
- Weekly backup files
- Monthly report archives
- Transaction log files
- Data warehouse extracts
Related Products
Related Categories
CASE/Code Generation
19 products
Application Development
296 products