Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ISREDIT - Restore find command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Michael Jakob

New User


Joined: 13 Mar 2011
Posts: 17
Location: Switzerland

PostPosted: Fri Apr 22, 2011 11:51 am    Post subject: ISREDIT - Restore find command
Reply with quote

Hello folks,

I wrote an Edit-Macro. In this Macro I find/seek some to a point in the source of a programm. However, after this find command, the find of my macro is active for REFIND. I would like to restore the original find options. How can I manage this?

User:
====
COMMAND===> F 'ABC' .a .e

COMMAND ===> MyMacro

MyMacro:
======
ADDRESS 'ISPEXEC'
"ISREDIT MACRO"
"ISREDIT FIND 'END'"
/* somehow restore the original find - command (F 'ABC' .a .e) */
????

"ISREDIT MEND"

I Tried with USER_STATE. Unfortunately, it didn't work.
Back to top
View user's profile Send private message

Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Thu May 12, 2011 6:20 pm    Post subject: Re: ISREDIT - Restore find command
Reply with quote

ISPF Edit keeps the search string recently used at a specific storage address. It does not keep any history. So if you issue a FIND in your edit macro, the value recently entered by the user will always be overwritten.

You have to keep the "old" search argument in memory by yourself and re-activate it by issuing a "fake" FIND for that string after your own processing and immediately before your edit macro ends and thus control is given back to the user.

Use the following link and scroll to the very end of my web page to see an example of how to determine the recently used search string:

https://sites.google.com/site/schlabb/home/code-snippets/edit-utilities

Hope this helps.

Stefan
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Thu May 12, 2011 6:35 pm    Post subject: Re: ISREDIT - Restore find command
Reply with quote

Michael Jakob wrote:
I Tried with USER_STATE. Unfortunately, it didn't work.

That's very interesting, can you share with us what it was that didn't work, so that I can adapt my 93 edit macros that use USER_STATE (and that work) for the release of z/OS that you use...
Back to top
View user's profile Send private message
Michael Jakob

New User


Joined: 13 Mar 2011
Posts: 17
Location: Switzerland

PostPosted: Tue May 17, 2011 12:46 am    Post subject: Reply to: ISREDIT - Restore find command
Reply with quote

Hi Stefan,

it's amazing, it just worked. icon_biggrin.gif


Thank you very much

With kind regards


Michael
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 MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us