Accessing a Specific GDG at Execution Time



High Level Assembler(HLASM) for MVS & VM & VSE

Accessing a Specific GDG at Execution Time

Postby Pallen14 » Sat Apr 19, 2008 8:23 am

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.
Pallen14
 
Posts: 1
Joined: Sat Apr 19, 2008 8:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accessing a Specific GDG at Execution Time

Postby dick scherrer » Sat Apr 19, 2008 8:58 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Accessing a Specific GDG at Execution Time

Postby dick scherrer » Sun Apr 27, 2008 5:17 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post