Try the following in REXX:
ARG DEBUG
IF DEBUG = 'DEBUG' THEN ,
  TRACE I
T = A
A = B
B = C
C = 123
INTERPRET 'SAY "T = "'T /* THIS SHOULD GIVE T = B */
EXIT 0
 
Then try the following in Clist:
PROC 0
SET T = A
SET A = B
SET B = C
SET C = 123
WRITE "T = " &T                   /* THIS SHOULD GIVE T = A */
WRITE "T = " &&T                  /* THIS SHOULD GIVE T = B */
WRITE "T = " &&&&T                /* THIS SHOULD GIVE T = C */
WRITE "T = " &&&&&&&&T            /* THIS SHOULD GIVE T = 123 */
/* I HAVE NO ACCESS TO CLIST HENCE CANNOT VERIFY HOW MANY &'S */
EXIT CODE(&MAXCC)
 
IIRC, IBM's REXX was distributed in 1990. Before that it was Clist.
VPUT/VGET SHARED works also in batch TSO jobs, not only in ISPF/PDF.
 
How did I *ever* come to be in that situation? Because I had written my
own ISPF/PDF dialog that bypassed IBM's ISR@PRIM etc. "IVP" one.
 
Cheers.
 


On 21/03/2020 01:44, Paul Gilmartin wrote:
> On Sat, 21 Mar 2020 00:39:16 +0000, CM Poncelet wrote:
>
>> No, there is no problem with that. I assume you meant "EXECIO 1 DISKR
>> "ddn1" (STEM foo."
>>   
> More likely: "EXECIO * DISKR" ddn1 "(STEM foo."
>
>> The problem happens e.g. if a variable X contains the names of other
>> variables, which in turn contain the names of yet other variables etc.
>> etc. which finally - with say names Z1 Z2 Z3 etc. - have values that
>> need to be accessed. 
>>  
> How did you *ever* come to be in that situation?
>
>> We can "VPUT X (and all the other variables' names) SHARED" and call an
>>
> Why drag ISPF into the game?
>
>> external exec. It issues "VGET X SHARED" and then "VGET "X" SHARED". But
>> how does it then VGET the other variables and their values in such way
>> that they can be processed? The variable names can be VGET as data, but
>> REXX cannot use data - such as names Z1 Z2 Z3 etc. - as names of
>> variables (although INTERPRET *might* be able to fix that.)
>>  
> VALUE() should suffice.
>
>> Clist can allocate variable names dynamically, using &'s, and can then
>> use SYSSCAN to control how many &'s are interpreted. Its problem is it
>>
> Ouch!  And such people sneer at C.
>
>> cannot ADDRESS environments and cannot process binary data, which REXX can.
>>  
> In  effect, CLIST can ADDRESS one environment, TSO.
> (What are ISPEXEC and ISREDIT?  Perhaps TSO subcommands?)
>
> Are the examples in the ISPF docs still biased toward CLIST rather than Rexx?
>
> Did CMS ISPF ever recover from the need to:
>     ADDRESS ISPEXEC ISPEXEC whatever-command?
>
> -- gil
>
> ----------------------------------------------------------------------
> 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