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