What is the important of gdg's

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
anilsani285
Member
Posts: 10
Joined: Sun Jul 04, 2010 5:26 pm

What is the important of gdg's

Post by anilsani285 » Tue Jul 06, 2010 12:39 pm

Where shall we use the gdg in real time projects ....
can any one give some examples regarding this....
Anil-Sani

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Tue Jul 06, 2010 12:50 pm

look like.. it is an interview question.
First tell us.. what is your answer to this question? before we answer this question.
Natarajan
Chennai

anilsani285
Member
Posts: 10
Joined: Sun Jul 04, 2010 5:26 pm

Post by anilsani285 » Wed Jul 07, 2010 8:11 am

Hi Natarajan...

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

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Wed Jul 07, 2010 10:43 am

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..

so, the data fromprior reports also available.

for more information.. refer following...
http://www.mainframegurukul.com/srcsinc ... pter9.html
Natarajan
Chennai

anilsani285
Member
Posts: 10
Joined: Sun Jul 04, 2010 5:26 pm

Post by anilsani285 » Wed Jul 07, 2010 11:09 am

Thanks man for the right answer .

Any thing else that i need to know about GDG will help me a lot while advising to my students.
Anil-Sani

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Jul 07, 2010 2:25 pm

There can be daily activity for which you need weekly/monthkly report and not daily reports - GDGs gets pretty handy in such cases.
Regards,
Anuj

User avatar
simOnic
Member
Posts: 12
Joined: Wed Jul 14, 2010 9:15 pm

Post by simOnic » Wed Jul 14, 2010 9:53 pm

Additional points;

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).

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Jul 14, 2010 10:20 pm

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.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others