Not sure exactly what you mean. Do you want an edit macro that is sensitive to 
the contents of the cursor line? I JUST did that. If so, you will need:

You want the following so you don't crash on errors:
    Call Addr_ISP "CONTROL ERRORS RETURN"   /* So errors are not fatal */

You need the following or you can't read the screen (and look up what else you 
need if you will be passing arguments):
 Address ISREDIT "MACRO"   

Then, to read the line where the cursor is, you need
Call Addr_ISP "ISREDIT (MYLINE, MYCOL) = CURSOR"
Call Addr_ISP "ISREDIT (USRLINE) = LINE &MYLINE"
Call Addr_ISP "VPUT (USRLINE)"
Call Addr_ISP "VGET (USRLINE)"

The line with the cursor on it is now in Rexx variable USRLINE.

Here is the suboutine referenced above:
Addr_ISP:
  req = Arg(1)
  Address ISPEXEC req
  RetCd = RC
  If RetCd <> 0 Then Do
    /* error processing of your choice */

HTH,
Charles

On Sat, 13 Sep 2025 13:52:49 -0500, Steve Beaver <[email protected]> wrote:

>I want to write a REXX that I can execute from the Command Line while
>editing a dataset and put the
>
>Cursor on the item I want to edit.
>
>
>
>Has anyone done that before?
>
>
>
>Kind of like doing a QW
>
>
>
>TIA
>
>
>
>Steve
>
>
>
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to