Remove EXIT CODE(0)

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Steely.Mark
Sent: Wednesday, September 17, 2025 12:48 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

This is not using REXX. 

ISREDIT MACRO
ISREDIT CAPS OFF
ISREDIT CHANGE "LOWER" "lower" word all
ISREDIT RESET
EXIT CODE(0)

Thanks

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Phil Smith III
Sent: Wednesday, September 17, 2025 12:43 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

 !

CAUTION! EXTERNAL SENDER! STOP, ASSESS, AND VERIFY Do you know this person? 
Were you expecting this email? If not, report it using the Report Phishing 
Button!

Assuming your code is Rexx, what you're missing is that your double quotes are 
being consumed by Rexx. What you're passing on the CHANGE is:

(variable)      ISREDIT
(space)
(variable)      CHANGE
(space)
(literal)       LOWER
(space)
(literal)       lower
(space)
(variable)      WORD
(space)
(variable)      ALL

Now, none of those variables have (presumably) been set, so their values are 
the uppercase versions of the variable name. Thus what ISPF sees is:
ISREDIT CHANGE LOWER LOWER WORD ALL

In other words, your quotes aren't getting to ISPF. Hence the quotes in Chip's 
version:
"ISREDIT CHANGE 'LOWER' 'lower' word all"

That makes the ENTIRE command a literal to Rexx, so it gets passed as is (minus 
the single quotes), and ISPF sees what you want it to see.

Make sense? This is basic Rexx stuff but gets confusing with ISPF in the mix 
because of the quotes thing. My usual rule of thumb is to use single quotes for 
Rexx literals, so I can use the double quotes inside for ISPF. You could also 
double the quotes, but that gets super-fugly and even more confusing:
ISREDIT CHANGE """LOWER""" """lower""" word all

That will mean ISPF sees:
(variable)      ISREDIT
(space)
(variable)      CHANGE
(space)
(literal)       "
(literal)       LOWER
(literal)       "
(space)
(literal)       "
(literal)       lower
(literal)       "
(space)
(variable)      WORD
(space)
(variable)      ALL

In Rexx, it's a very good idea to ALWAYS know what's a literal and what's a 
variable and to quote all literals. It not only avoids problems but is also 
more efficient.

(The "problems" part comes when you have that line as you wrote it working, and 
then someone assigns variable LOWER to some value and all hell breaks loose!)

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Steely.Mark
Sent: Wednesday, September 17, 2025 1:07 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

I have the same issue - this is the code I use:

ISREDIT MACRO
ISREDIT CAPS OFF
ISREDIT CHANGE "LOWER" "lower" word all
ISREDIT RESET
EXIT CODE(0)

I did test the REXX version below and that did work - is there a way to get 
this version to work ?

Thank You



-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Phil Smith III
Sent: Wednesday, September 17, 2025 11:57 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

 !

CAUTION! EXTERNAL SENDER! STOP, ASSESS, AND VERIFY Do you know this person? 
Were you expecting this email? If not, report it using the Report Phishing 
Button!

Thank you! As a long-time XEDIT maven I'd been looking for such a book, for 
some reason never found it before. 488pp, that'll take a while to digest...

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Grantham, Chip
Sent: Wednesday, September 17, 2025 12:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

Google z/OS 3.1 ISPF Edit and Edit Macros

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Phil Smith III
Sent: Wednesday, September 17, 2025 11:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

What does
'Macro ()'
do? Pointer to doc would be great if you have it!

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Grantham, Chip
Sent: Wednesday, September 17, 2025 12:32 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Edit macro CHANGE not preseriving case

Try this:
 /* REXX */
 address isredit
 'Macro ()'
 'CAPS OFF'
 'CHANGE "AAA" "Aaa"' all
 Exit

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
ITschak Mugzach
Sent: Wednesday, September 17, 2025 11:25 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Edit macro CHANGE not preseriving case

I wrote a simple edit macro to change the case of a text. but it is still 
keeping the old case and not folding to lower case. for example:

/* Rexx */
Address ISREDIT
   CAPS OFF
   CHANGE 'AAA' 'Aaa' ALL

What am I doing wrong?

ITschak Mugzach
*|** IronSphere Platform* *|* *Information Security Continuous Monitoring for 
z/OS, x/Linux & IBM I **| z/VM coming soon  *

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to