It was a while since I had to dabble with this problem but you need to use
either "single" quote like  '   or a "double" one like  "  depending on
what kind you want use in the search/change/other type of string usage.

In complicated cases you may need to check wich ones that are used in the
string and where.
You may need to check if:
1. Both kinds are used. Here you need to split the string in two (or more)
separate strings and use them as required by the application.
2. Check which kind (if any) that are used in the string and use the other
kind for the string.

If we ignore the no 1 (which is very situation dependant) I use to do
something like this:

QUOTE_IT:
  Parse Arg  qistr
  If  Pos('"',qistr) > 0    Then  qi = "'"  /* Double quote in the input
string */
   Else                                      qi = '"'  /* Single quote in
the input string or none */

  Return  qi !! qistr !! qi


Thomas






Mundus Vult Decipi

Den lör 20 sep. 2025 23:39Seymour J Metz <[email protected]> skrev:

> If you want apostrophes in the command you send to ISREDIT then you need
> to either quote them or use variables that contain apostrophes, e.g.,
>
> Macro is:
> /* REXX */
>    address ISREDIT
>    'macro'
>    CAPS OFF
>    "CHANGE 'AAA' 'Aaa' ALL"
>    exit
>
> Macro is:
> /* REXX */
>    address ISREDIT
>    a="'"
>    'macro'
>    CAPS OFF
>    CHANGE a'AAA'a a'Aaa'a ALL
>    exit
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> עַם יִשְׂרָאֵל חַי
> נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
>
>
>
>
> ________________________________________
> From: IBM Mainframe Discussion List <[email protected]> on behalf
> of Phil Smith III <[email protected]>
> Sent: Saturday, September 20, 2025 9:49 AM
> To: [email protected] <[email protected]>
> Subject: Re: Edit macro CHANGE not preseriving case
>
>
> External Message: Use Caution
>
>
> Ah sorry.
>
> Rexx, from within ISPF Edit.
>
> Macro is:
> /* REXX */
>    address ISREDIT
>    'macro'
>    CAPS OFF
>    CHANGE 'AAA' 'Aaa' ALL
>    exit
>
> (sometimes without the 'macro', or with TRACE ?R), invoked directly from
> the commandline via "macroname" or via "tso macroname", depending on what
> we're trying to test/prove.
>
> z/OS 3.1 on a zPDT using Tom Brennan's Vista 3270 on a ThinkPad T14 on my
> desk in my den in Virginia on planet Earth, sunny and 68 degrees
> Fahrenheit, both inside and out.
>
> That enough environmental information? 😊
>
> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On Behalf
> Of Paul Gilmartin
> Sent: Friday, September 19, 2025 10:32 PM
> To: [email protected]
> Subject: Re: Edit macro CHANGE not preseriving case
>
> On Fri, 19 Sep 2025 10:06:34 -0400, Phil Smith III wrote:
>
> >I just tried it, I think:
> >CAPS ON
> >PROFILE LOCK
> >PROFILE (shows LOCK and CAPS ON)
> >Then I ran the macro: no errors and the display changed to show CAPS OFF.
> So the lock gets overridden by the macro, interesting.
> >    ...
> I'm lost.  Please clarify:
> Which macro language?:
>     CLIST
>     REXX
> Which command environment?:
>     TSO
>     ISPEXEC
>     ISREDIT
>
> Any other possible environment queries.
>
> ----------------------------------------------------------------------
> 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