View previous topic :: View next topic
|
Author |
Message |
alapatma
New User
Joined: 03 Mar 2007 Posts: 3 Location: mumbai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
alapatma
New User
Joined: 03 Mar 2007 Posts: 3 Location: mumbai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Option 3.13 will give you all you need |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
alapatma
New User
Joined: 03 Mar 2007 Posts: 3 Location: mumbai
|
|
|
|
Thanks, the rexx utility will do the trick. |
|
Back to top |
|
|
Abhishek_Indore
New User
Joined: 20 Oct 2010 Posts: 6 Location: INDIA->US->UK
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Abhishek_Indore
Thank you for your reply, however it is exactly the same solution as given by Ofer, but entered manually. |
|
Back to top |
|
|
|