Sie sind auf Seite 1von 5

GDG INTERVIEW QUESTIONS

http://mainframe-world.com/gdg/GDG - Q1.html

WELCOME TO MAINFRAME W RLD


Mar-01-2012

GDG Interview Questions


Beginner Level Intermediate & Advanced Level

What is a Generation Data Group or GDG? A Generation Data Group or GDG is a collection of two or more chronologically related versions of the same data set. Each version is called a generation data set.

Why do we need GDGs? Consider an application in regular production where the output of January month's run becomes the input to February month's run and so on. DSN parameters in the JCL needs to be changed for every month's run. If GDGs are used, there's no need to change the JCL for every run (data set names change with every run). How does GDG processing work? Before processing: The current generation is referred as generation 0 and the previous generations are referred to as generations -1, -2, -3 and so on. +1 refers to the next generation. Update procedure: During current generation processing, the current generation gets updated and the next generation is referred to as +1. After processing:

1 of 5

3/1/2012 6:06 PM

GDG INTERVIEW QUESTIONS

http://mainframe-world.com/gdg/GDG - Q1.html

Each time a generation data set is processed, a new generation of the data set is added to the GDG. Once the update/process job completes successfully, the new generation becomes the current generation i.e., 0. The old current generation becomes the previous generation, i.e., -1. The other relative previous generation numbers are reduced by 1.

Each generation data set of GDG must be cataloged. This catalog entry is used to keep track of the relative generation numbers. How is a GDG named?

Dsname - Dataset/Group Name Gnnnn - Absolute generation number (0000 to 9999) Vnn - Version. (00 to 99) What is the maximum number of datasets that can exist in a GDG? 255 How is a GDG catalog entry created? A GDG catalog entry is created by executing the VSAM utility program IDCAMS and issuing a DEFINE GDG command. List down the sub parameters used to create a GDG (IDCAMS utility). NAME LIMIT EMPTY/NOEMPTY SCRATCH/NOSCRATCH OWNER TO/FOR Explain NAME sub parameter.

2 of 5

3/1/2012 6:06 PM

GDG INTERVIEW QUESTIONS

http://mainframe-world.com/gdg/GDG - Q1.html

NAME sub parameter is coded on the DEFINE GDG statement and is used to specify the name of the dataset or generation data group that is to be created. Syntax: NAME(name) where name can range from 1 to 44 characters. Explain LIMIT sub parameter. LIMIT sub parameter is coded on the DEFINE GDG statement and is used to specify the total number of generations that the GDG may contain. Syntax: LIMIT(number) where number can range from 1 to 255 characters. What are the advantages of GDG? Record Keeping is the responsibility of the Operating System, and not of the programmer. Convenient way of relating data sets together and automatic deletions of outdated data sets. Explain EMPTY Sub Parameter? The EMPTY Parameter is used for un-cataloging ALL Generations of GDG when the limit has been reached. Assume that you have created with a limit of 5. So when the limit is reached All Generations will be un-cataloged. GDG Creation with LIMIT Parameter

GDG Base

GDG Listing before reaching the limit

GDG Listing after reaching the limit

3 of 5

3/1/2012 6:06 PM

GDG INTERVIEW QUESTIONS

http://mainframe-world.com/gdg/GDG - Q1.html

From the above example the GDG is created with EMPTY option with LIMIT as 5. Once the limit is reached, all OLD generations will be un-cataloged ie IBM1H2G.MFWORLD.EMPTY.GDG.G0001V00, IBM1H2G.MFWORLD.EMPTY.GDG.G0002V00, IBM1H2G.MFWORLD.EMPTY.GDG.G0003V00, IBM1H2G.MFWORLD.EMPTY.GDG.G0004V00 and IBM1H2G.MFWORLD.EMPTY.GDG.G0005V00. The new generation only will stay ie IBM1H2G.MFWORLD.EMPTY.GDG.G0006V00 Explain SCRATCH and NOSCRATCH Sub Parameters? The SCRATCH and NOSCRATCH Parameters are mutually exclusive. SCRATCH specifies whether the entry of the dataset has been removed from the index or not in GDG. NOSCRATCH specifies if the entry of the dataset is un-cataloged and physically deleted from the removed volume of GDG What is the Continuation Character used in IDCAMS Utility ? Hyphen (-) is used as a continuation character in IDCAMS. It can be placed before column 72

What is the Command to Change the GDG Properties ? ALTER Command is used to change the properties of existing GDGs. Any new generations that are created for this GDG will be in the new future. Create GDG

Change the property using ALTER command

How to Delete a Specific Generation in GDG ? There are many ways to delete a specific generation. Here IEFBR14 utility along with DISP=(OLD,DELETE,DELETE) parameter has been used which is the simplest way to delete a specific generation. Assume that you have 5 generations and want to delete the 3rd generation.

4 of 5

3/1/2012 6:06 PM

GDG INTERVIEW QUESTIONS

http://mainframe-world.com/gdg/GDG - Q1.html

GDG Generations Before Delete

JCL to Delete 3rd Generation using Absolute number

GDG Generations After Delete

Copyright 2008 - 2012 Mainframe World - All rights reserved


HOME | DISCLAIMER | CONTACT US

5 of 5

3/1/2012 6:06 PM

Das könnte Ihnen auch gefallen