View previous topic :: View next topic |
Author |
Message |
sri50131 Beginner
Joined: 07 Oct 2004 Posts: 38 Topics: 15
|
Posted: Tue Jan 30, 2007 9:55 am Post subject: Search for a string within a dataset name |
|
|
Hi all,
I would like to know if it is possible to search for a string within a dataset name.
For ex: if I have a dataset AAAA.BBBB.CCCC.DDDD.EEEEE, is it possible to search for CCCC.
Thanks |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Tue Jan 30, 2007 10:28 am Post subject: |
|
|
Search by JCL, by program ?
Pls. post more details. |
|
Back to top |
|
|
sri50131 Beginner
Joined: 07 Oct 2004 Posts: 38 Topics: 15
|
Posted: Tue Jan 30, 2007 10:42 am Post subject: |
|
|
Using JCL - is possible to search for a string within a dataset name?
Thanks |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Jan 30, 2007 10:48 am Post subject: |
|
|
if you build your dsns with symbolics, you can write IF constructs. but, what are you actually doing?
Remember, JCL does not do anything: it is the language used to tell the computer, what to do..... _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Jan 30, 2007 11:05 am Post subject: |
|
|
sri50131,
May be I am missing something here, but it is quite simple
In 3.4
put aaaa.* and press enter
now at the command promt type Save List now the list will be saved
Press PF1. This will show you where the list is saved.
now open this list dataset for edit.
At the command prompt type x all; f 'cccc' all;del x all and press enter.
now you have all the datasets which contains the string 'cccc'
Alternatively this can be done in batch using LISTCAT and sort to pick the desired records
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sri50131 Beginner
Joined: 07 Oct 2004 Posts: 38 Topics: 15
|
Posted: Tue Jan 30, 2007 11:27 am Post subject: |
|
|
Kolusu, this is my situation. My job currently is using a standard set of loadlibs. However, there are a few teams that use different loadlibs. So, if I can some how search for the string within the dataset name, then I can direct the JCL execute another step that has a different set of loadlibs.
Thanks |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jan 30, 2007 2:53 pm Post subject: |
|
|
JCL contains no logic (other than if/then/else on return codes). This sounds like you need to get your shop's procedures straightened out.
You could run the program from Rexx (still in Batch) rather than directly through JCL invocation, but it sounds like that would be a temporary, and hard to maintain solution to what is a much bigger problem. |
|
Back to top |
|
|
|
|