"van Sleeuwen, Berry" wrote:
> A rexx program is yet another file to maintain. Within specs would save
> me from creating a separate file.
The two approaches I often use to avoid the extra file are:
1. Do the whole task inside the pipeline, so you just have a REXX
stage and no EXEC at all.
2. Test ADDRESS() at the start of your EXEC to decide whether it's
called from the command line or from the pipeline, and then call
the exec itself as a REXX stage:
/* bimodal EXEC/stage */
Parse Source . . myfn myft myfm .
If Address() = 'CMS' then Do /* your EXEC stuff here, including: */
Address COMMAND
'PIPE' whatever '| rexx (' myfn myft myfm ')' morestuff
End
Else /* do your pipeline stage stuff here */
¬R