View previous topic :: View next topic
|
Author |
Message |
knownothing
New User
Joined: 28 Apr 2005 Posts: 2 Location: au
|
|
|
|
i have a library containing all gdg files created by unloading a mq message queue everyday. if i want to search some records from the gdgs i have to manually search every gdg from the newest to oldest until i found it or them.
now this job needs to be done automaticlly by jcl.
if there is a feasible solution like let one jcl submit a job search the first gdg then if haven't found it will submit second job until found it.
and it will be able to stop when all the gdg files have been searched (how many gdgs in the library is always different) instead of giving a jcl error because the next search file XX.XX.120(this file doesn't exit any more in the library) cann't be found.
i really need a solution, could you pls give your thoughts really appreciate it!! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Not knowing more about what you need to accomplish, your concept should work just as you described it.
I am curious, though, if there is a reason why it would be necessary to search each GDG one at a time, rather than searching the entire set of GDG's as a concatenated file. I do know that if you are searching with the SuperC utility (PGM=ISRSUPC) and using the entire set of GDG's as the input, it will indicate what specific dataset it found the search criteria in. |
|
Back to top |
|
|
knownothing
New User
Joined: 28 Apr 2005 Posts: 2 Location: au
|
|
|
|
hi, the purpose of the gdg is to hold the records from a mq queue, problem is everyone can unload the mq, so you don't know which gdg will contain the record u are up to. because the data from mq is sharing by lots of people, really lot's of people there is not sure how many gdgs will exist at any given time and the newest gdg change very quickly.
normal situation is you unload the mq and think your data will appear in the newest gdg but when you open the dataset, it's not there then you keep searching back. found out the record is in (14) already.there are too many people unloading mq at any given time, you just can't be fast enough to catch you data.
i want the job can handle the mission to put all the gdg together but i can't tell the job how many gdgs there are it has to figure out from (0) to whatever last one.
pls ask if my explaination is not clear, thks alot. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
It has been awhile, but I think you just omit the generation ref in the DSN and you get all generations as if they are concatenated.
DSN=$DCN.TEST99 rather than DSN=$DCN.TEST99(0)
Dave |
|
Back to top |
|
|
|