I need to develop a tool to search for a particular working storage variable in a member of PDS.
When the cursor is placed on the working storage variable to be searched and the user presses a PF key say F4 the the cursor should go to the declaration of the working storage variable and when the user presses the same key again the cursor should go to the subsequent occurrence of the same variable. Finally when the user presses another PF key the cursor should go to the initial position.
This is similar to the search for a word conducted in an editor. But in this case the program should read the working storage variable from the cursor position instead of giving the string to be searched as an input.
I need to develop this because in find user has to type the variable to be searched in the command section and press F5 instead I need to search the variable by placing the cursor under it and just press the PF key so tht it becomes more easier.
I'm new to REXX so please explain the commands that can be used for this.
Joined: 08 May 2006 Posts: 192 Location: Dublin, Ireland
Quote:
instead I need to search the variable by placing the cursor under it and just press the PF key so tht it becomes more easier.
So, under your scenario, the user has to read through the text until they see the exact string they want - possibly several pages down, THEN position the cursor on it and THEN start the PF key searching?? This hardly seems
Quote:
more easier
ofer71's suggestion of using an ISPF Edit Macro would probably suit, but you still have to get the user to initiate this someway.
I need this tool particularly for debugging purpose suppose if he come across a variable and he needs to see its declaration and picture clause on a key press the cursor has to go to the declaration. This and on subsequent presses it should go to the next occurrence.
I needthis tool particularly for debugging purpose suppose if he come across a variable and he needs to see
It is not clear if you need or he needs... however I sort of see the benefit.
Study the ISPF Edit manual. I suggest to use:
1. CURSOR macro instruction to determine line and column of cursor location.
2. LINE macro instruction to get the data into rexx variable
3. UP MAX macro instruction
4. EXCLUDE ALL to hide all lines
5. Use the FIND ALL macro instruction to find occurrences of the search text.
The cursor should be at the first instance, which frequently is the variable declaration. Use F5 to move cursor to next instance of the variable.