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 find more than one word by single find command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to find more than one word by single find command
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

Site Director


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

PostPosted: Sat Oct 30, 2010 10:30 am    Post subject:
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    Post subject: Reply to: How to find more than one word by single find comm
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: 8593
Location: Back in jolly old England

PostPosted: Sat Oct 30, 2010 11:26 am    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Oct 31, 2010 10:45 am    Post subject:
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    Post subject: Reply to: How to find more than one word by single find comm
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 01, 2010 8:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 3 Mon Mar 27, 2017 3:59 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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