I think there is a "not" to many in the PS.  > erases the file when it
sees no input.

   j.

2009/8/19 Rob van der Heij <[email protected]>:
> On Wed, Aug 19, 2009 at 11:26 AM, Michaël
> Dugaleix<[email protected]> wrote:
>
>> Is there any risk in reading from a file and writing into the same one
>> ('pipe (...) < myFile | ... | > myFile') ?
>> I mean : May my original file be corrupted ?
>> Supposing that :
>> - there's no bug in my OS (z/VM)
>> - there's no bug in CMS Pipelines (sorry, no offense meant ...)
>
> As "pipe ahelp >mdisk" says, CMS Pipelines will write the data to a
> new utility file. After completion the old one is erased and the new
> file renamed (when SFS, look at PIPE ahelp configvars)
>
> There's also another possible problem:
> - there's a bug in your plumbing ;-)
>
> The neat thing with "commit levels" in CMS Pipelines makes sure that
> all things are ready to run before erasing your existing file (for
> example when you have a syntax error in the pipeline).
>
> So suppose you wanted to go through a list and drop all entries that
> are expired, you can certainly do that. Obviously CMS Pipelines does
> not protect you from perfect pipes that just don't do the right thing
> (like forgetting to handle the start of the year in your comparison).
> But chances are that when you coded in REXX a check on return code
> etc, you would have lost your data too.
>
> Rob
>
> PS Be aware that when the pipeline does not produce any records, the
> file is not erased. If you want that, you can add "strliteral //" in
> the path (and use the "disk" stage rather than "<" when reading the
> input)
>

Reply via email to