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 
<imugz...@gmail.com> 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:clark.pear...@ventura-uk.com
>> 

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

Reply via email to