Capture GDG generation for specific date range.

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Barbie Girl
Registered Member
Posts: 20
Joined: Mon Aug 12, 2013 11:06 am

Capture GDG generation for specific date range.

Post by Barbie Girl »

Hi,

To create a report I need an input file which will be created using some GDG generations. Base of the GDG has more than 220+ generations available. While I need to pick the generation from 31st to 60, 45th to 65 ..like that. Is there any way I can give the gdgs as input apart from hard coding them one by one in the job.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Capture GDG generation for specific date range.

Post by nicc »

No. Except you could write a program that will take information about which datasets you need and will dynamically allocate them one-by-one. Or write a similar program that will output the JCL that you require.
Regards
Nic
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Capture GDG generation for specific date range.

Post by Anuj Dhawan »

Caution: Reading between the lines so might be off the mark.

If I got it correctly, I think you can run IDCAMS on the GDG base and look for the creation date of the GDGs it lists. Pick only those which interests you, based on the creation date of the GDS. Though, there can be questions about this approach based on the rules you might have on choosing the GDGs...
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Akatsukami
Global Moderator
Global Moderator
Posts: 122
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL
Contact:

Re: Capture GDG generation for specific date range.

Post by Akatsukami »

There seems to be an implicit assumption by Barbie-chan that one generation is created per fixed time period, so that (relative?) generations 31 to 60 always correspond to last (not necessarily calendar) month's data. i think that I would go with nicc's suggestion and write a programette to generate the required JCL.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
Barbie Girl
Registered Member
Posts: 20
Joined: Mon Aug 12, 2013 11:06 am

Re: Capture GDG generation for specific date range.

Post by Barbie Girl »

What Akatsukami said that is not a possibility at the moment. But can you please show me an example of what you are suggesting Anuj. I am not getting how can I read the creation date of the GDG.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Capture GDG generation for specific date range.

Post by nicc »

Amongst the information returned when you run a list with the appropriate parameters in IDCAMS is the create date. You will have to scan the output with a program to extract those dates and the dataset name that each date refers to.

Run a quick IDCAMS now against a gdg and look at the output on SDSF (or the equivqlent in your organisation). Check the IDCAMS manual for the correct parameter to use. You can then rerun putting the SYSPRINT to a dataset which a program can then query. You will still have to have the program generate the JCL required to process those datasets or the proccess could be part of the program initialisation routine, saving the information to an array (PL/1) ot table (COBOL) and then use dynamic allocation and continue your program's main logic.
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”