View previous topic :: View next topic
|
Author |
Message |
Bhagyashree Panigrahi
New User
Joined: 03 Mar 2009 Posts: 7 Location: Pune
|
|
|
|
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 |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
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 |
|
|
Bhagyashree Panigrahi
New User
Joined: 03 Mar 2009 Posts: 7 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Bhagyashree Panigrahi
New User
Joined: 03 Mar 2009 Posts: 7 Location: Pune
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
Bhagyashree Panigrahi
New User
Joined: 03 Mar 2009 Posts: 7 Location: Pune
|
|
|
|
I did think of doing that. However, is there any way to do it in one step using SRCHFOR?
Thanks,
Bhagyashree |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
running the search with IDPFX,XREF
will make it easier to write a simple rexx to process the srchfor output |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Adding FINDALL to the PARM options will allow you to search for "STRING A" and "STRING B" in the members |
|
Back to top |
|
|
mayanksoni4u
New User
Joined: 08 Sep 2009 Posts: 3 Location: Bangalore
|
|
|
|
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 |
|
|
mayanksoni4u
New User
Joined: 08 Sep 2009 Posts: 3 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|