You are right that was an interview question i heard from my student and GDG is used to save the historical data like old program codes in the form of generations and for day to day transaction of banking projects....
Any thing i need to add or Iam compltely wrong about this. _________________ Anil-Sani
one example is..
there is a jcl which runs on a particular time and create report on profits gained by the company.
If you use normal file as output. we need to code that jcl , in such a way that.. first delete yesterdays file before executing program which actually creates the file with today data.
To not to loose prior days data, we can use gdg... so that .. we dont required to delete old file... and we can use gdg name in the step where program creates reports... it will create new generation.. without deleting old generation file..
1. All datasets have the same name and system keep the track of adding new and retaining previous generations and deleting oldest successive generation.
2. We can use same JCL for executing without changing the file names.
3. The new GDG is coded as DSN=XYZ.ABCD(+1) and if we want to access the latest version just code like DSN=XYZ.ABCD(0).
probably most important,
it removes the need to name files with dates.
when reading a gdg base (implicit concatenation of all existing/valid generations)
the order is newest to oldest.
though there is a utility from www.cbttape.o r g (idiot forum rules about outside links)
called GDGCOPY and it read the catalog and processed the files in oldest to newest.
Great for merging weekly SYSLOG dumps, etc.
in fact, cbttape has a wealth of information that you should perhaps incorporate in your class.
I also think it is cheesy of you to base class instruction (your job - your pay)
on free forum input.
but, nice of you to be honest about it. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum