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
 

 

Macro to find a string

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Macro to find a string
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    Post subject:
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

Senior Member


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

PostPosted: Tue Mar 30, 2010 9:33 pm    Post subject: Reply to: Macro to find a string
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    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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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