Assuming that novalue is not active, you can use a symbol anywhere that allows 
an expression;

    foo = ISPEXEC
    ADDRESS VALUE foo

The basic form of ADDRESS does not allow an expression for the environment, 
hence an unquoted name is just uppercased.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Bob 
Bridges [robhbrid...@gmail.com]
Sent: Thursday, June 24, 2021 7:40 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Coding for the future - REXX quoting

That brings up an interesting question (by which I mean "a question about
which any answers y'all might provide will interest me, at least").  I quote
most constants in REXX, depending as little as possible on REXX's
interpretation of uninitialized variables.  Like so:

  address ISPEXEC 'VGET <varname>'
  'EXECIO * DISKR' ddname '(FINIS'
  "ALLOCATE DSN('"dsn"') DDN(TEMPDD) SHR"
  trace 'I'

And so on.  But some words I don't quote, notably "ISPEXEC" above.  I think
I got that from the manual, but I gather it would work either way.  a) Why
does the manual have us quote some words and not others?, and b) when does
it make a difference?  For that matter, dear reader, what do ~you~ quote?

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* A man does not insist on physical beauty in a woman who builds up his
morale.  After a while he realizes that she ~is~ beautiful -- he just hadn't
noticed it at first.  -Lazarus Long */

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Seymour J Metz
Sent: Thursday, June 24, 2021 09:12

No, I'm saying that the second script is a more expensive version of the
first.

'ADDRESS foo bar' evaluates bar and passes it to the foo environment. If you
omit the command, then 'ADDRESS foo' just sets the default environment to
foo. Commands in the ISPEXEC and ISREDIT environments go to ISPF and ISPF
EDIT; they are not TSO commands. There are ISPEXEC and ISREDIT commands for
the benefit of those writing in CLIST and you don't need them for REXX. A
faster verbose form is:

/* rexx */
ADDRESS ISPEXEC "FTOPEN TEMP"
ADDRESS ISPEXEC "FTINCL SOMEJCL"
ADDRESS ISPEXEC "FTCLOSE"
ADDRESS ISPEXEC "VGET (ZTEMPF)"
ADDRESS TSO
say ztempf

I see the use of unquoted symbols as one of the strengths of REXX, when used
sensibly. But quoting everything certainly does no harm, and might be
marginally faster.

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