View previous topic :: View next topic
|
Author |
Message |
Michael Jakob
New User
Joined: 13 Mar 2011 Posts: 17 Location: Switzerland
|
|
|
|
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 |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Michael Jakob
New User
Joined: 13 Mar 2011 Posts: 17 Location: Switzerland
|
|
|
|
Hi Stefan,
it's amazing, it just worked.
Thank you very much
With kind regards
Michael |
|
Back to top |
|
|
|