Re: Coding for the future - REXX quoting

2021-06-25 Thread Jeremy Nicoll
On Fri, 25 Jun 2021, at 15:00, Paul Gilmartin wrote:

> In TSO, the argument of ADDRESS is case-insensitive; in CMS, case-sensitive.
> I understand it's a PSW.  Sounds dangerous.

PSW?

-- 
Jeremy Nicoll - my opinions are my own.

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


Re: Coding for the future - REXX quoting

2021-06-25 Thread Paul Gilmartin
On Thu, 24 Jun 2021 19:40:23 -0400, Bob Bridges wrote:

>...  I quote
>most constants in REXX, depending as little as possible on REXX's
>interpretation of uninitialized variables.  Like so:
>
>  address ISPEXEC 'VGET '
> ...
It's MFC's idiosyncrasy.  There's sound justification for not evaluating
the symbol in TRACE symbol -- it facilitates interactive tracing.  Little such
for ADDRESS symbol -- ADDRESS VALUE expression is needlessly cumbersome.

In TSO, the argument of ADDRESS is case-insensitive; in CMS, case-sensitive.
I understand it's a PSW.  Sounds dangerous.

-- gil

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


Re: Coding for the future - REXX quoting

2021-06-24 Thread Seymour J Metz
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 '
  '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  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


Re: Coding for the future - REXX quoting

2021-06-24 Thread Bob Bridges
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 '
  '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  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