IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find more than one word by single find command


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
alapatma

New User


Joined: 03 Mar 2007
Posts: 3
Location: mumbai

PostPosted: Sat Oct 30, 2010 10:14 am
Reply with quote

I wanted to search two words in a program using 'Find' command. E.g. I want to search for lines containing 'IF' and 'EVALUATE'. How can I achieve this. Is there a way concatenating two search in one.
Also do upload if there is a good doc on find commands.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Oct 30, 2010 10:30 am
Reply with quote

Hello and welcome to the forum,

What you want to do will probably require more than a "find". . .

You should also consider that the IF and the EVALUATE will often not be on the same source line. . .

Suggest you post some example source that contains "hits" and not hits and explain any processing rules.
Back to top
View user's profile Send private message
alapatma

New User


Joined: 03 Mar 2007
Posts: 3
Location: mumbai

PostPosted: Sat Oct 30, 2010 10:48 am
Reply with quote

Well I wanted to find all lines containing IF or EVALUATE

e.g.

IF A =B
Move ...
END-IF
.
.
EVALUATE
WHEN
.
.

I want the find to get lines.
IF A =B
END-IF
EVALUATE

I wanted to view all conditional statements in the code, so is there a way to search both words with one find (F ALL) statement.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Oct 30, 2010 11:26 am
Reply with quote

Option 3.13 will give you all you need
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Oct 31, 2010 10:45 am
Reply with quote

How about a small edit macro like this?
Code:
/* REXX */                                 
                                           
ADDRESS ISREDIT "MACRO (ARG1 ARG2) PROCESS"
ADDRESS ISREDIT "X ALL"                     
ADDRESS ISREDIT "F &ARG1 ALL"               
ADDRESS ISREDIT "F &ARG2 ALL"               
                                           
EXIT                                       


You may refine it to look for WORDs, HILITIE, CURSOR position etc.

O.
Back to top
View user's profile Send private message
alapatma

New User


Joined: 03 Mar 2007
Posts: 3
Location: mumbai

PostPosted: Sun Oct 31, 2010 7:35 pm
Reply with quote

Thanks, the rexx utility will do the trick.
Back to top
View user's profile Send private message
Abhishek_Indore

New User


Joined: 20 Oct 2010
Posts: 6
Location: INDIA->US->UK

PostPosted: Mon Nov 01, 2010 7:05 pm
Reply with quote

Hi,

Also,U can issue X ALL;F ALL <STRING 1> on your ISPF command SO it will show only the lines containg string1.

If u have multiple strings to find out then use X ALL;F ALL <STRING 1>;F ALL <STRING 2>.This will display the result which contains either string 1 or string2 or Both.

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 01, 2010 8:07 pm
Reply with quote

Abhishek_Indore

Thank you for your reply, however it is exactly the same solution as given by Ofer, but entered manually.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top