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!!
Joined: 26 Apr 2004 Posts: 4650 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.
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.