Page 1 of 1

Capture GDG generation for specific date range.

Posted: Mon May 30, 2016 11:11 am
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.

Re: Capture GDG generation for specific date range.

Posted: Mon May 30, 2016 6:36 pm
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.

Re: Capture GDG generation for specific date range.

Posted: Mon May 30, 2016 8:28 pm
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...

Re: Capture GDG generation for specific date range.

Posted: Mon May 30, 2016 11:26 pm
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.

Re: Capture GDG generation for specific date range.

Posted: Tue May 31, 2016 4:46 pm
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.

Re: Capture GDG generation for specific date range.

Posted: Tue May 31, 2016 5:10 pm
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.