It is really the ISPEXEC API that is doing it, and not just for REXX -- you get 
the same behavior when you call ISPEXEC from assembler code.

It's just that with CLIST the substitution would normally be done before it 
ever got to ISPEXEC.

And, the same thing happens with ISREDIT.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Schmitt, Michael
Sent: Tuesday, December 16, 2025 12:32 PM
To: [email protected]
Subject: Re: Need Help using LMCOPY in a Rexx program

I left out the quotes to make it a literal, passed to ISPEXEC: "LMCOPY 
FROMID(&FROMID) ... "

The interface from REXX to ISPF does &variable substitution. You can't stop it, 
but you can exploit it!

It of course limits such variables to ISPF variable naming restrictions.

It is documented in the ISPF Services Guide at Introduction to ISPF services > 
Invoking the ISPF services > Using command invocation variables:

"You can use a CLIST or REXX variable, in the form of a name preceded by an 
ampersand (&), as the service name or as a parameter anywhere within a 
statement. Each variable is replaced by its current value before execution of 
the ISPEXEC command."

https://www.ibm.com/docs/en/zos/2.5.0?topic=procedures-using-command-invocation-variables



-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Tuesday, December 16, 2025 11:28 AM
To: [email protected]
Subject: Re: Need Help using LMCOPY in a Rexx program

On Tue, 16 Dec 2025 17:16:59 +0000, Schmitt, Michael wrote:
>    ...
>  - LMCOPY FROMID(&FROMID)      /* pass the value of FROMID back */
>
Wouldn't REXX fail at the "&"?  That seems to be CLIST syntax.

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