Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Where do FIND and RFIND store the search target?

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

New User


Joined: 01 Nov 2008
Posts: 5
Location: Kansas City MO

PostPosted: Fri Nov 07, 2008 8:04 am    Post subject: Where do FIND and RFIND store the search target?
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 07, 2008 12:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
James Magruder

New User


Joined: 01 Nov 2008
Posts: 5
Location: Kansas City MO

PostPosted: Fri Nov 07, 2008 11:27 pm    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

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.

http://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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Nov 07, 2008 11:51 pm    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

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 icon_biggrin.gif

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Nov 08, 2008 3:38 am    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2025
Location: Silicon Valley

PostPosted: Sat Nov 08, 2008 9:30 am    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

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
View user's profile Send private message
James Magruder

New User


Joined: 01 Nov 2008
Posts: 5
Location: Kansas City MO

PostPosted: Sun Nov 09, 2008 8:49 pm    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Nov 09, 2008 9:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
James Magruder

New User


Joined: 01 Nov 2008
Posts: 5
Location: Kansas City MO

PostPosted: Mon Nov 10, 2008 12:24 am    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Nov 10, 2008 12:46 am    Post subject: Reply to: Where do FIND and RFIND store the search target?
Reply with quote

You're welcome - good luck icon_smile.gif

d
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 particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us