On 2016-09-30, at 01:34, Rob van der Heij wrote:
>>> I sometimes wish that Pipelines were closer to Rexx conventions (with
>>> a little POSIX wisdom added). Newline would always be a STAGESEP,
>>> except that a trailing "," (as in Rexx)
>> CMS Pipelines never see a newline nor a trailing ,
>> REXX is in between what you code and PIPE; people sometimes seem to forget
>> that REXX interprets it first.
>> For example, if one codes:
>> 'PIPE Literal A',
>> '| Console'
>> The PIPE command gets the following string as input "Literal A | Console"
>
> Indeed, that's all determined by REXX doing host commands as a single string.
>
Understood. And I know enough (at least on the second try) to eliminate
that pesky blank by coding either:
'PIPE Literal A' || ,
'| Console'
... or:
'PIPE Literal A|' ,
'Console'
> There is no law that requires you to write your pipelines in REXX. It is
> pretty easy to write a REXX program that reads a file, say filetype PIPE,
> and applies all kind of formatting conveniences. I have done things like
> that for a web server that used a mix of HTML and pipelines. I have a
> REXX CLIST that takes SYSIN data from the job stream to construct the pipe.
>
And that converter might be written as a pipeline. Primarily because
Pipelines addresses Rexx's lack of instream data capability by providing
the BEGOUTPUT command. Too often I've had to write an EXEC/XEDIT pair,
one to launch XEDIT naming the other as a profile. Instream data could
reduce this to a single EXEC. The command stack is a cumbersome
alternative.
The Pipelines Rexx stage has the clever feature of supporting FT and FM
specification. Too many times programmers have needed to circumvent
the obstacle of using an EXEC or MODULE that's not first in search
order by using NUCXLOAD/EXECLOAD.
This has allowed me to progressively convert a few of my medium sized
EXECs to Pipelines by starting wih PARSE SOURCE then re-invoking themselves
as REXX stages. I change PIPE to Callpipe and use ADDRESS COMMAND for
any remaining procedural code. But then I'm able to Addpipe.
I probably won't write the converter. It makes me think of an acquaintance
accustomed to VMS who wasted much time writing wrappers to make UNIX behave
like VMS. And decades ago I similarly wasted my time to make XEDIT resemble
ISPF Edit, largely to eliminate one behavior (perhaps two) of XEDIT that I
deemed intolerable. I used unsupported interfaces; the code works poorly
now; I'm not repairing it.
-- gil