Gil, I can't tell whether you're suggesting more things that CLIST can do that
REXX cannot, or things that REXX can do even though I said it cannot. a) I
don't know what CHAROUT is, but it sounds like the same issue as WRITENR. Or
are you saying it's some sort of REXX function that can imitate CLIST's
WRITENR? b) I don't know what "RYO" is either ("rite your own"?), but unless
I'm thinking of something different, RXSOCKET isn't trick CLIST can do that
REXX cannot; I used it to write a socket server (and a separate client) in
REXX. And c) TSO EDIT isn't an exception to what I wrote, it's a perfect
example of #2 below, a subsystem that CLIST can interact with dynamically (if
that's the word) and REXX cannot. Exactly what I was talking about, although I
used FTP as my example because FTP is what I've encountered most recently. I
haven't used TSO Edit in ... well, must be the early '80s at the latest, maybe
the late '70s.
So what am I missing?
---
Bob Bridges, [email protected], cell 336 382-7313
/* In religion, as in war and everything else, comfort is the one thing you
cannot get by looking for it. If you look for truth, you may find comfort in
the end; if you look for comfort you will not get either comfort or truth —
only soft soap and wishful thinking to begin with and, in the end, despair.
-CS Lewis in _The Case for Christianity_ */
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Paul Gilmartin
Sent: Sunday, March 22, 2020 15:06
--- On Sun, 22 Mar 2020 14:27:53 -0400, Bob Bridges wrote:
>As far as I know there are only two useful tricks CLIST can perform that REXX
>can't. Well, maybe three:
>
>1) WRITENR. So when I really need it, I use an external REXX exec named SAYNR
>that does the same thing - by calling a CLIST that does a WRITENR. Works like
>a champ, but I wouldn't want to try it inside a loop.
>
CHAROUT()? It seems quaint that so many z/OS utilities don't
accept the reply on the same line as the "Prompt:"
>2) Interacting with subsystems. In CLIST you can issue FTP commands, for
>example, evaluate the response and decide where to go from there; REXX handles
>subsystems as batch, essentially.
>
RXSOCKET? Lotsa RYO. And still leaves TSO EDIT.
>3) Dunno whether you'd count this, but CLIST has a neat built-in functionality
>for evaluating parms. I get around this by starting every REXX with a SELECT
>statement that evaluates each space-delimited word in the arg list; it's more
>complicated, but it means that in most cases I can enter arguments in any
>order, which pleases me. Like this (to pick a complex example with many
>possible arguments):
>
> fnox=0; fall=0; acid=''; ddnfm=''; ddnto=''
> arg args; do while args<>''; parse var args arg args; select
> when arg='DBG' then trace 'I' /* trace mode */
> when arg='NOX' then fnox=1 /* no-execute mode */
> when abbrev('LISTALL',arg,5) then fall=1 /* turn on list-all mode */
> when pos('.',arg)>0 then dsn=arg /* set the DSN */
> when tgetacid(arg)=0 then acid=arg /* set the ACID */
> when length(arg)<9 & ddnfm='' then ddnfm=arg /* from DD */
> when length(arg)<9 & ddnto='' then ddnto=arg /* to DD */
> otherwise call abend 'Unrecognized arg' arg; end; end
>
>The only requirement here regarding argument order is that the From DD has to
>be named before the To DD; everything else the operator can type in as it
>happens to occur to him.
>
>This makes my REXX execs a little messy up front, but gives me flexibility
>that I value. And anyway I'm used to it now. Easily worth the extra trouble
>to get access to the power REXX affords over CLIST. Too bad about #2, though.
>
At least you don't use INTERPRET.
-- 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