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

Macro to find a string


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

New User


Joined: 23 Jan 2007
Posts: 16
Location: Mysore

PostPosted: Tue Mar 30, 2010 8:56 pm
Reply with quote

I'm writing a few macros to automate my work. This below code I've written this below piece of code to find a string. It almost like "F ALL" tso command. But it will display only lines where this string is present. Below is the code.

Code:

/* REXX */                 
ADDRESS ISREDIT             
"MACRO (ARG1)"             
"RESET EXCLUDED"           
ARG1 = STRIP(ARG1)         
UPPER ARG1                 
IF ARG1='' THEN DO         
ADDRESS ISPEXEC             
  ZEDSMSG = 'ENTER STRING' 
 'SETMSG MSG(ISRZ001)'     
END                         
ELSE DO                     
ADDRESS ISREDIT             
"EXCLUDE ALL"               
"FIND '"ARG1"' ALL"         
 END                       
EXIT


It working fine but as I am using "EXCLUDE" so I'm getting following O/P

- - - - - - - - 2 Lines not displayed - - - - -
lines with the string
- - - - - - - - 12 Lines not displayed - - - - -
lines with the string
- - - - - - - - 5 Lines not displayed - - - - -

Like this.
is there any way to remove this "Lines not displayed - - - - -" lines?

Secondly I want to add few below logic. Suppose any string present 5 times so my macro will list all these 5 place and now if I put the cursor on the 3rd place and hit enter then it will RESET and 3rd occurrence at starting of the screen.


[/code]
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 30, 2010 9:30 pm
Reply with quote

to remove the 'excluded' lines you can
DELETE ALL X

but then they are gone.

as far as this business of cursor on 3rd place -
enter DOWN CURSOR (or up can't remember);RESET EXCLUDED
place your cursor on the 3rd item and hit enter.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Tue Mar 30, 2010 9:33 pm
Reply with quote

Read about HIDE X and RESET HIDE commands.
| Sorry, not sure if you meant to delete or merely hide the excluded lines.

Your other question about the third line is not clear. Please restate.
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 Replace each space in cobol string wi... COBOL Programming 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
Search our Forums:

Back to Top