Thank you Kris and Rob

I took Rob’s suggestion and created a “notempty” stage…

Pipe … | notempty > Some file a
And made it slightly more generic in case you need the data to keep
flowing.

Pipe … | notempty > some file a | notempty > some file b




On Wed, Mar 19, 2025 at 02:21 Kris Buelens <[email protected]> wrote:

> As about PUTFILES: I consider it as quite generic, but indeed I also
> encountered problems, like too many output files open at the same time.  As
> a result it has a few options you can use to avoid various issues.
>
> https://www.vm.ibm.com/download/packages/descript.cgi?PUTFILES
>
> I created it to be used in compile requests coming from a z/OS, sent as a
> package of many source objects.  And once there were that many objects
> (about 400) that it ran into the problem "storage full", background reason:
> too many open files.  So options were added to avoid this.
>
> Kris Buelens,
>      --- VM/VSE consultant, Belgium ---
> -----------------------------------------------------------------------
>
>
> Op wo 19 mrt 2025 om 09:07 schreef Rob van der Heij <[email protected]>:
>
> > On Wed, 19 Mar 2025 at 05:00, Donald Russell <[email protected]>
> > wrote:
> >
> > > I have a pipeline that may produce output I want to replace an existing
> > > file with.
> > > If the pipeline doesn't produce any output, I don't want to erase the
> > > existing file.
> > >
> >
> > Indeed, the idea is that ">" and others first verify that they can
> actually
> > do what they must (like write to that SFS directory). That's helpful for
> > when the pipeline also does other non-reversible things. It's probably
> more
> > obvious on input files. The process is a bit more subtle than you would
> > imagine; it's an area where I took two attempts to get it working.
> >
> > Does this simple pipeline stage in REXX do what you meant?
> >
> >   signal on error
> >   parse arg stage                   /* Stage like '> test file a'  */
> >   'peekto'                          /* Wait for record and commit  */
> >   'addpipe *.output: |' stage       /* Connect a pipeline          */
> >   'short'                           /* .. and get out of the way   */
> >   error: return rc * (rc <> 12)
> >
> > There have been attempts before to create a generic PUTFILES which would
> > implicitly have this behavior. I think that never made it into CMS
> > Pipelines because there are a lot of choices to be made, and it's easier
> to
> > orchestrate the plumbing that does what you expect, than to generalize
> the
> > various options. Note that there is also the "diskreplace" configuration
> > variable, for when you're dealing with SFS files under the cover of a
> file
> > mode.
> >
> > Sir Rob the Plumber
> >
>

Reply via email to