MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to refer unique dataset where last qualifier is unknown?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ntiruveedhul
Beginner


Joined: 31 May 2010
Posts: 1
Topics: 1

PostPosted: Wed Jul 21, 2010 4:21 pm    Post subject: How to refer unique dataset where last qualifier is unknown? Reply with quote

My requirement:
Let us assume I have following 5 datasets:
ABC.XYZ.D1.T123
ABC.XYZ.D2.T659
ABC.XYZ.D3.T280
ABC.XYZ.D4.T217
ABC.XYZ.D5.T479

We have ABC.XYZ.D*.T* as fixed format of the dataset available.
The no. follwing D and T are random, which we don't know.

D* >>> D<CURRENT_DATE>
T* >>> T<TIMESTAMP>
Depending on the date & time the respective dataset should be referred in the JCL. And there is only 1 unique dataset for current day.

Hard coding won't help because then everytime JCL has to be modified. I was looking for some generic method.

I hope i explained well, let me know if you need any further clarification.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Jul 21, 2010 4:29 pm    Post subject: Reply with quote

ntiruveedhul,

1. Listcat on LEVEL ABC.XYZ
2. Parse the output and search for the dataset name
3. Once found , create a dynamic JCL
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Jul 21, 2010 6:13 pm    Post subject: Reply with quote

Useful alternatives to listcat include ISPF's LMDIST, and the sample found in 'SYS1.SAMPLIB(IGGCSIRX)' . IBM recently suggested in an APAR that listings not be parsed because they can change and LISTCAT output did change, though a smart parser would not care about the extra data that was added.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group