What are the advantages of GDG?What is the diffrence between a GDG and a File?

Questions by madhupoornima

Showing Answers 1 - 9 of 9 Answers

Mazhar9

  • Dec 28th, 2007
 

Hello

GDG's are Generation Data groups....If you want to main tain the versions of the reports.....you can use generations.

Let us say your have to create a daily report throught your job, then if you use a flat file today's job will write the report to that flat file....and if same job runs tomorrow...job will overrite today's information with tomorrow's information depending on the DISP psotions your providing to u r flat file....so if you use flat file in this situation you will have only current data...previous data will be erased...

If you use generations your job will creates multiple versions of the dataset...like in your job if you give like this

//report  dd dsn=x.y.z(+1),
//                 disp=(new,catlg,delete),...etc

todays job will create report with dataset name X.Y.Z.G00V001
if same job runs tomorrow it will create out put file X.Y.Z.G00V002   so there is no chance that u will loose your data....

let me know if your not clear here...

  Was this answer useful?  Yes

serken

  • Dec 19th, 2008
 

Actually the dataset names are created as follows

X.Y.Z.G00001V00
X.Y.Z.G00002V00
X.Y.Z.G00003V00
X.Y.Z.G00004V00
X.Y.Z.G00005V00
X.Y.Z.G00006V00
. . . . . . . . .
etc up to the maximum number of generations defined for this particular GDG. The oldest generation after maximum is automatically deleted as soon as new one is created.

  Was this answer useful?  Yes

dhs01

  • Apr 15th, 2009
 

Basically a GDG is a catalog that will keep track of files. These files have names that conform to a certain standard. They can be generated and referenced using relative numbers. Existing versions can also be allocated as a group - but it's kind of ugly.
Generally if you want the current version you reference  xxxx.xxxx(0) - this might be your input and your output might be xxxx.xxxx(+1) - much easier than trying to keep track of your own files...    

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions