Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to search for members in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Bhagyashree Panigrahi

New User


Joined: 03 Mar 2009
Posts: 7
Location: Pune

PostPosted: Thu Aug 20, 2009 2:31 pm    Post subject: How to search for members in PDS
Reply with quote

I am tryig to write a jcl which will select the members in a PDS having String A and String B in it. I tried using SRCHFOR but it searches for members with the OR condition. That means if i provide the below code
//SYSIN DD *
SRCHFOR 'STRING A'
SRCHFOR 'STRING B'
/*
The member names that will be found are the ones having 'STRING A' or 'STRING B' or both. But i want to display member names which have only both the the strings('STRING A' and 'STRING B' )

Please provide a sample code for the same.
Back to top
View user's profile Send private message

Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Aug 20, 2009 3:05 pm    Post subject:
Reply with quote

Do you want that the member should contains strings in the data or the string are the member name, if so then use 3.14 and run a batch job to search for the member.
COuld you please explain the requirement if this does not solve ur problem
Back to top
View user's profile Send private message
Bhagyashree Panigrahi

New User


Joined: 03 Mar 2009
Posts: 7
Location: Pune

PostPosted: Thu Aug 20, 2009 4:38 pm    Post subject: Reply to: How to search for members in PDS
Reply with quote

What I am trying to do here, is find the members of PDS which have both string A and string B in them. I do not want the members which have only String A or only String B.

Thanks,
Bhagyashree
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 20, 2009 4:40 pm    Post subject:
Reply with quote

Looks like it may be a two step job,

1) Find all members with string A
2) Find all members with string B
3) Compare the members and select only the same names.
Back to top
View user's profile Send private message
Bhagyashree Panigrahi

New User


Joined: 03 Mar 2009
Posts: 7
Location: Pune

PostPosted: Thu Aug 20, 2009 4:47 pm    Post subject:
Reply with quote

I have some 50 strings. I need to pick up all members having string A and atleast one of the other 49 strings in it. In logical way it would be (string A) AND (string B OR stringC OR stringD etc). how do I go about doing it?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2163
Location: @my desk

PostPosted: Thu Aug 20, 2009 4:57 pm    Post subject:
Reply with quote

Again, does n't it look like this?

1) Find all members with string A
2) Find all members with strings-B or C or D or E....
3) Compare the members and select only the same names.
Back to top
View user's profile Send private message
Bhagyashree Panigrahi

New User


Joined: 03 Mar 2009
Posts: 7
Location: Pune

PostPosted: Thu Aug 20, 2009 4:59 pm    Post subject: Reply to: How to search for members in PDS
Reply with quote

I did think of doing that. However, is there any way to do it in one step using SRCHFOR?

Thanks,
Bhagyashree
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 20, 2009 5:37 pm    Post subject: Re: Reply to: How to search for members in PDS
Reply with quote

Bhagyashree Panigrahi wrote:
I did think of doing that. However, is there any way to do it in one step using SRCHFOR?

If there were, do you not think that we might have said so icon_rolleyes.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Thu Aug 20, 2009 8:28 pm    Post subject:
Reply with quote

If you have File-Aid, I think you can accomplish this in 1 step. It's been a while since I've done it and don't have mainframe access at this time.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Aug 20, 2009 8:41 pm    Post subject:
Reply with quote

Just use:
Code:
//SYSIN DD *
   SRCHFOR  'STRING A'
   SRCHFORC 'STRING B'
/*

And if you want STRING A followed by STRING B you only need:
Code:
//SYSIN DD *
   SRCHFOR  'STRING A'
   SRCHFORC 'STRING B',+
/*
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Aug 20, 2009 8:47 pm    Post subject:
Reply with quote

Ooops, this works only if the strings are on the same line!
If they can be anywhere in the member, you'll need multiple steps.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Aug 20, 2009 8:56 pm    Post subject: Reply to: How to search for members in PDS
Reply with quote

running the search with IDPFX,XREF

will make it easier to write a simple rexx to process the srchfor output
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Sun Aug 23, 2009 2:58 pm    Post subject: Reply to: How to search for members in PDS
Reply with quote

Adding FINDALL to the PARM options will allow you to search for "STRING A" and "STRING B" in the members
Back to top
View user's profile Send private message
mayanksoni4u

New User


Joined: 08 Sep 2009
Posts: 3
Location: Bangalore

PostPosted: Tue Sep 08, 2009 3:31 am    Post subject:
Reply with quote

Hi,

I am trying to search a member in PDS,currently I am doing this through FILE-AID batch program by giving following command in SYSIN:

$$DD01 LMODDIR MEMBER= "member name"

Since I have hundreds of member to search ,FILEAID is taking lot of time to do that.

Can someone please suggest any other quick method.
Back to top
View user's profile Send private message
mayanksoni4u

New User


Joined: 08 Sep 2009
Posts: 3
Location: Bangalore

PostPosted: Wed Sep 09, 2009 4:19 am    Post subject:
Reply with quote

Also I tried searching same through 3.14 "SRCHFOR" option.Since all the members contains images It is taking more time than FILEAID.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 09, 2009 9:46 pm    Post subject:
Reply with quote

Hello,

Possibly a re-design is in order if this is to be done more than rarely. . .?

Searching high volume will take time no matter how the data is searched.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Copy one PDS to another PDS based on ... alluri12 JCL & VSAM 10 Tue Sep 29, 2015 8:10 pm
No new posts Search and replace the key in the report V S Amarendra Reddy SYNCSORT 1 Thu Jul 09, 2015 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us