Page 1 of 1

Accessing a Specific GDG at Execution Time

PostPosted: Sat Apr 19, 2008 8:23 am
by Pallen14
I have a project where I need to access 1 of 13 GDG's at execution time. The GDG's are created each month. At execution time, based on a I/P date, I need to reference the appropriate GDG and process. For example: I have 13 month's of Data in GDG's. Assuming the GDG's are created at monthend, If the request is for data ending 01/2008, I will need to be able to access the -2 generation at execution time assuming the request is submitted this month 04/08. The actual GDG requested is determined the the 'peroid ending date that will be established at request time.

Re: Accessing a Specific GDG at Execution Time

PostPosted: Sat Apr 19, 2008 8:58 am
by dick scherrer
Hello Pallen and welcome to the forums,

One easy way to do what you want is to have a "driver" job process the "input" date and calculate the relative generation (i.e. -2). After calculating the relative generation, the driver could submit the "real" job via the Internal Reader with the proper generation specified.

Re: Accessing a Specific GDG at Execution Time

PostPosted: Sun Apr 27, 2008 5:17 am
by dick scherrer
Hello pallen,

However, I guess I'm a little at a loss when you say that after the relative GDG is determined to submit the job via internal reader. One of the complications is that this process is a multi (18) step job. Once the correct GDG is determined, how does that DSN get referenced in the subsequest job step?
If you post the first couple of steps that use the needed relative gdg, i'll try to turn it into an example you can expand to be your complete job.