View previous topic :: View next topic
|
Author |
Message |
James Magruder
New User
Joined: 01 Nov 2008 Posts: 5 Location: Kansas City MO
|
|
|
|
I'd like to use the target of the last FIND command in an edit macro. Where is the target from the Find command stored, and how can I retrieve it?
Obviously it's there someplace, or the RFIND command wouldn't work... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Code: |
"ISREDIT (CRSLINE,CRSCOL) = CURSOR" |
Will store the line number and column number of the cursor at the time that the statement was executed.
Click HERE to access the manual. |
|
Back to top |
|
|
James Magruder
New User
Joined: 01 Nov 2008 Posts: 5 Location: Kansas City MO
|
|
|
|
Actually I'm trying to get the info from a FIND command that was used before my macro was invoked.
So, if the last FIND command was "FIND PREV ABCDE", I want to modify it, and issue the command "FIND NEXT ABCDE", or maybe "FIND WORD ABCDE".
The RFIND command retrieves the info from the previous Find command. I want to grab that info, just like RFIND does. But I can't find where it's stored.
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispedt03/3.3.97?ACTION=MATCHES&REQUEST=USER+STATE&TYPE=FUZZY&SHELF=ISPBKM08.bks&DT=19990720125310&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
The Edit manual does drop a hint that USER_STATE stores the Find info:
-----
The USER_STATE assignment statement saves or restores the state of edit profile values, FIND, CHANGE, SEEK, and EXCLUDE values, and panel and cursor values.
-----
But that's not enough to go on.
edited to put the correct url |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10874 Location: italy
|
|
|
|
please especially when posting links ( like in the previous post )
use the preview button to see what the post looks like,
and test the link to see if it takes where You want us to be taken
the previous link takes to nowhere
- I am not worried since I work on a mac, but the windoze community might object |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
I do not know where it is found, but to do another search on the same string you can use * to refer to the string you found last. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
you might be able to work some magic by using the retrieve information to find the last find issued. (though not sure how) just putting it out in case someone knows more. |
|
Back to top |
|
|
James Magruder
New User
Joined: 01 Nov 2008 Posts: 5 Location: Kansas City MO
|
|
|
|
Apologies for the bad link. I'll be more careful next time.
Douglas Wilder, thanks for that comment about using * to repeat the previous string. That might work for me. (I've been using the ISPF editor for 20 years, and I didn't know about that.)
As for using Retrieve or RETP to get to the last FIND command, maybe I could make that work, but I'm curious now about where that Find information is stored. Seems like a VGET should be able to retrieve it... if I knew what it was called. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This may be the same info you found earlier (i added the bold):
Quote: |
USER_STATE—Save or Restore User State
z/OS V1R10.0 ISPF Edit and Edit Macros
SC34-4820-08
The USER_STATE assignment statement saves or restores the state of edit profile values, FIND, CHANGE, SEEK, and EXCLUDE values, and panel and cursor values.
Syntax
Assignment statement syntax
>>-ISREDIT--(varname)-- = --USER_STATE-------------------------><
>>-ISREDIT--USER_STATE-- = --(varname)-------------------------><
varname
The name of a variable to contain your status information.
Note:
The information in the variable is saved in an internal format that is subject to change. Dependence on the format can lead to macro errors.
Description
USER_STATE can be used at the beginning of a macro to save conditions, and at the end of a macro to restore the conditions that may have changed during processing. Many of the values saved by USER_STATE can be saved and restored individually. The USER_STATE assignment statement is a simple way of saving many values with a single statement.
These edit modes and values are saved and restored by USER_STATE:
AUTOLIST CURSOR NOTES RECOVERY
AUTONUM HEX NULLS STATS
AUTOSAVE IMACRO NUMBER TABS
BOUNDS MASKLINE PACK TABSLINE
CAPS MODEL CLASS PROFILE
Return codes
0 Normal completion
20 Severe error
Examples
To save the user state in variable &STATUS:
ISREDIT (STATUS) = USER_STATE To restore the user state from variable &STATUS:
ISREDIT USER_STATE = (STATUS)
|
If you are willing to deal with a "surprise" as part of an upgrade, you might try to dump &STATUS and see if it is usable for what you want.
I sent a note to one of my contacts and he replied that he didn't believe it was directly available to code. |
|
Back to top |
|
|
James Magruder
New User
Joined: 01 Nov 2008 Posts: 5 Location: Kansas City MO
|
|
|
|
Dick,
Thanks for the info. Yes, that's the USER_STATE doc that I tried to refer to earlier.
I'll try dumping the contents of USER_STATE. If I find anything interesting I'll report back. (And I'm aware that the format might change in the future.) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
d |
|
Back to top |
|
|
|