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

ISREDIT - Restore find command


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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
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:

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: 1306
Location: Vilnius, Lithuania

PostPosted: Thu May 12, 2011 6:35 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top