IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching unknown number of gdgs


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
knownothing

New User


Joined: 28 Apr 2005
Posts: 2
Location: au

PostPosted: Thu Apr 28, 2005 2:50 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 28, 2005 7:07 pm
Reply with quote

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
View user's profile Send private message
knownothing

New User


Joined: 28 Apr 2005
Posts: 2
Location: au

PostPosted: Fri Apr 29, 2005 3:00 am
Reply with quote

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
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Apr 29, 2005 3:23 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top