Hello everyone,

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

Are there really only two alternatives ?
- the RC is 0, which means that all went well, as I wanted (including the
case where the file is erased, on CMS, when there's no data left at the end
of the pipeline)
- the RC is not 0, which means something bad happened (the syntax of my
pipeline is correct, but the pipeline didn't find a file in a second input
stream, or my disk is full, or I don't have enough memory for a "sort"
stage, ...), but my original file is left untouched

Or do I have to do it with two actions to be sure it's robust :

pipe (...) < myFile | ... | > myTemporaryFile
if (RC ...)
COPY myTemporaryFile myFile
if (RC ...)

Thanks,
Michaël

Reply via email to