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: 1102
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 Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Need help with 002-030 ABEND in TSO R... Terry Tallian TSO/ISPF 0 Sat Mar 17, 2018 1:13 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Old gds of GDG not rolledoff after AD... Wallace Lee IBM Tools 2 Fri Feb 09, 2018 9:34 pm
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm

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