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 

Search for a string within a dataset name

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Tue Jan 30, 2007 9:55 am    Post subject: Search for a string within a dataset name Reply with quote

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


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Tue Jan 30, 2007 10:28 am    Post subject: Reply with quote

Search by JCL, by program ?

Pls. post more details.
Back to top
View user's profile Send private message
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Tue Jan 30, 2007 10:42 am    Post subject: Reply with quote

Using JCL - is possible to search for a string within a dataset name?

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Jan 30, 2007 10:48 am    Post subject: Reply with quote

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


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

PostPosted: Tue Jan 30, 2007 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Tue Jan 30, 2007 11:27 am    Post subject: Reply with quote

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


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

PostPosted: Tue Jan 30, 2007 2:53 pm    Post subject: Reply with quote

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
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 -> Job Control Language(JCL) 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