Oops, sent the result of executing the exec on itself. Here's the "before":

/* REXX  */
address ISREDIT
   "MACRO"
   "SCAN OFF"
   variable = 'newstring'
   "CHANGE  'oldstring' &variable ALL"

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Schmitt, Michael
Sent: Monday, September 22, 2025 9:25 AM
To: [email protected]
Subject: Re: Edit macro CHANGE not preseriving case

No, (variable) in a find/seek/change string is treated as a string (variable).

But what you can do is leverage a behavior in the REXX to ISREDIT interface: it 
ALWAYS does &variable substitution. There is no way to disable this, which can 
cause problems. But in this case...

/* REXX  */
address ISREDIT
   "MACRO"
   "SCAN OFF"
   variable = 'newstring'
   "CHANGE  'newstring' &variable ALL"

SCAN OFF is to turn off the 2nd level of &var replacement in Edit. We don't 
need it.


This technique is the way to do FIND/CHANGE commands where the string contains 
a &, such as if you're operating on JCL temporary DSN names.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Sunday, September 21, 2025 9:29 PM
To: [email protected]
Subject: Re: Edit macro CHANGE not preseriving case

On Sun, 21 Sep 2025 14:05:01 +0100, Rupert Reynolds wrote:

>One alternative I use in Rexx is to assemble a whole multi-quoted string
>command in a variable, making debugging a bit easier, then:-
>    ...
Can one use (variable-name) as string1 or string2?

I know I have solved the quote problem doing something similar with:
    address ISREDIT 'LINE AFTER' n '= (variable)'

--
gil

----------------------------------------------------------------------
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



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

Reply via email to