> a) I don't know what CHAROUT is, 

ANSI REXX added a facility called stream I/O; CHAROUT is one of the stream I/O 
functions. As the name suggests, it writes characters to a stream. It's like 
the PL/I statement PUT EDIT (FOO) (A);

> b) I don't know what "RYO" is either

Roll Your Own

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

I'm not sure what the proper nomenclature is, but the ECEC command doesn't 
actually run a CLIST. EXEC stage 1 compiles the CLIST, pushes a CLIST entry on 
the stack and exits. When the TMP or a command that it attaches does a GETLINE 
or PUTGET, EXEC stage 2 continues interpreting the compiled CLIST until it 
encounters a DATA or DATA PROMPT, at which time it returns a line either from 
the stack or from the terminal.


--
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: Monday, March 23, 2020 12:28 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Does anybody remember CLIST?

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, robhbrid...@gmail.com, 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:IBM-MAIN@LISTSERV.UA.EDU] 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 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

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