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 2 strings

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Wed Mar 02, 2011 2:45 pm    Post subject: Search for 2 strings Reply with quote

How would I use search in ISPF (3.14/3.15) to find all dataset members that had both of two given strings in it, not necessarily on the same line.

So I want to find all source code members that have both the ADD and SUBTRACT verb in them, for example.

Thanks!
Back to top
View user's profile Send private message
prino
Banned


Joined: 01 Feb 2007
Posts: 45
Topics: 5
Location: Oostende

PostPosted: Wed Mar 02, 2011 3:08 pm    Post subject: Reply with quote

You would probably need to do two searches with the 'LMTO' process option and use a SuperC compare on selected parts of the two output listings.

Just from the top of my head, not really any time to try this out.
Back to top
View user's profile Send private message
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Thu Mar 03, 2011 8:27 am    Post subject: Reply with quote

Thanks Prino. Someone gave me a solution using a Rexx script that trawls thru each member of the dataset and uses Edit macros to find the 2 strings.
I was hoping there was some Search option to do it more simply.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Mar 03, 2011 1:49 pm    Post subject: Reply with quote

Extending the suggestion provided by prino, you can search both the strings together as shown in the code below and sort the OUTDD file for duplicate members.

Code:
//SEARCH  EXEC PGM=ISRSUPC,           
//            PARM=(SRCHCMP,'LMTO,XREF,NOSUMS')   
//NEWDD  DD ...
//OUTDD  DD ...
//SYSIN  DD *                         
SRCHFOR  'ADD'                   
SRCHFOR  'SUBTRACT'                 
/
*
_________________
Regards,
Diba
Back to top
View user's profile Send private message Send e-mail
sumithar
Beginner


Joined: 22 Sep 2006
Posts: 84
Topics: 29

PostPosted: Fri Mar 04, 2011 3:18 pm    Post subject: Reply with quote

Thanks- we use SYNCSORT so I need to use XSUM dataset to get what I actually want from the SORT step.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Fri Mar 04, 2011 5:58 pm    Post subject: Reply with quote

Diba's post is not about the sort. It uses the SuperC compare utility.

I believe the posted SRCHFORs will be "or" rather than "and". If i'm able later, i'll connect and try a test.
_________________
All the best,

di
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Mar 24, 2011 2:03 pm    Post subject: Reply with quote

papadi wrote:

I believe the posted SRCHFORs will be "or" rather than "and". If i'm able later, i'll connect and try a test.


papadi,

I thought you would provide with the your observation so didn't reply and forgot.

You are right, SuperC will provide the OR result.

But when you sort the result to get the duplicate member names, you get the AND result.

Note: If the dataset is sequential then you can get AND result from SUPERC. Not sure if you need to specify additional option.
_________________
Regards,
Diba
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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