We still did not see what the rest of the OP code's does, despite claiming to 
just remove the FIND. A return code of 1 will not produce an error, it is 
documented as how to get the cursor on the command line.

If I believed everything a user told me they did I would never be able to solve 
problems. After claiming they changed nothing I look at the link-edit date and 
when I see 'todays' date they suddenly start remembering changed they made.

I'd rather see the full source to explain the behavior then just the bits the 
OP 
cared to share and their claims. Removing the find may have affected some 
error handling in a way they were not concerned with.

I stand by my post, a return code of zero will leave your cursor where the 
code left it and a one will put the cursor on the command line, as documented.



On Fri, 20 Feb 2009 09:21:01 -0600, Big Iron <[email protected]> 
wrote:

>That behaviour is defined in the ISPF EDIT macro publication in the section
>"Return Codes from User-Written Edit Macros":
>" 12 and higher
>    Error return codes. The cursor is placed on the command line"
>
>I think that an error message also normally appears saying that the EDIT
>macro failed. However, the OP did state that simply removing the FIND
>command changed the behaviour.
>
>Bill
>
>On Fri, 20 Feb 2009 06:27:55 -0600, Kenneth E Tomiak
><[email protected]> wrote:
>
>>I would go with wrong expectations (or user error) based on the result the 
OP
>>says they got. Edit macros have a documented feature where ending the 
edit
>>macro with a zero return code (I favor RETURN 0) will leave the cursor
>>positioned and a non-zero return code will place the cursor on the command
>>line. It is not evident from the OP original snippet how their edit macro
>>terminates.
>>
>>
>>
>>On Wed, 18 Feb 2009 17:02:44 +0200, Itschak Mugzach
>><[email protected]> wrote:
>>
>>>Haven't tried that, but why not just doing:
>>>
>>>"find xxx'
>>>"locate 401"
>>>"find xxx"
>>>
>>>It will put the cursor on the start of the found string without changing the
>>>screen position as the find value is in the LVLINed area.
>>>
>>>ITschak
>>>
>>>On Wed, Feb 18, 2009 at 4:45 PM, Clark Pearson <clark.pear...@ventura-
>>uk.com
>>>> wrote:
>>>
>>>> Hello.
>>>>
>>>> Can anyone explain why the following code snippet doesn't work as
>>>> expected?  (This has prev gone to Google Groups, was advised to wait 
until
>>>> our z/OS upgrade from 1.7 to 1.9 had been completed - it has - but the
>>>> same thing still happens.)
>>>>
>>>> I would expect it to leave the member with line 401 at the top, and the
>>>> cursor on line 412, pos21.  The FIND string is on line 412 - I want the
>>>> cursor to stay with the FOUND string, but to change the line that 
appears
>>>> at the top of the display.
>>>>
>>>> /* rexx */
>>>> address isredit
>>>> "macro"
>>>> "FIND WS-MODULE-IDENTIFIER"
>>>> "locate 401"
>>>> "cursor = 412 21"
>>>>
>>>> If I *remove* the FIND command, it correctly locates and positions the
>>>> cursor.  That is, line 401 is at the top of the display, the cursor
>>>> appears on line 412.
>>>>
>>>> *With* the FIND command, it positions the display according to my
>>>> EDITSETting "Target Line for Find/etc", ignoring the LOCATE command.
>>>>
>>>> If I place the CURSOR command *before* the LOCATE command, it 
obeys
>>the
>>>> LOCATE but loses the cursor placement (cursor in command line).  Same 
if I
>>>> remove the CURSOR line completely.
>>>>
>>>> Is this a bug in ISPF, or an undocumented "feature" in the generally
>>>> not-very-good IBM documentation, which I have explored in depth?
>>>>    http://publibz.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/ISPZEM40/3.3.31
>>>>
>>>> Thank you,
>>>> Clark.
>>>>
>>>> Clark Pearson
>>>> Senior Analyst/Programmer
>>>> (Oracle & Mainframe)
>>>> IT Systems, Ventura
>>>> ( 0113 2073564 (x33564)
>>>> 8 mailto:[email protected]
>>>>
>>
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: GET IBM-MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to