View previous topic :: View next topic |
Author |
Message |
ntiruveedhul Beginner
Joined: 31 May 2010 Posts: 1 Topics: 1
|
Posted: Wed Jul 21, 2010 4:21 pm Post subject: How to refer unique dataset where last qualifier is unknown? |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Jul 21, 2010 4:29 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Jul 21, 2010 6:13 pm Post subject: |
|
|
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 |
|
|
|
|