I can't get it to fail. What release and level of Pipes are you using? BTW, wouldn't best coding practices imply a change of the 'CMS' stages to 'COMMAND' stages (with all uppercase arguments)? Pity of someone has their own 'LISTDIR' or 'QUERY' exec on an accessed disk. Yes, that's a VERY bad practice - but why expose your code to their very bad practice?
Mike Walter Hewitt Associates Any opinions expressed herein are mine alone and do not necessarily represent the opinions or policies of Hewitt Associates. "Schuh, Richard" <[email protected]> Sent by: "CMSTSO Pipelines Discussion List" <[email protected]> 04/06/2009 04:33 PM Please respond to "CMSTSO Pipelines Discussion List" <[email protected]> To [email protected] cc Subject Schroedinger's Cat I have a Pipe, fragment below, that has several CMS command stages, each one processing commands built from the responses of the prior command. Eventually, there is a SORT. This Pipe was failing with an immediate RC=70. I tried inserting some '| >> diag file d' stages at various points and, unexpectedly, the program ran to a successful completion. If I took out the diagnostic writes, it failed again. My next try was to remove all diagnostic writes except for the first. Once again, success. I replaced the write with an Elastic stage, which resulted in a failure. Replacing the Elastic with a Copy resulted in success. Next I tried moving the Copy to different locations. It succeeded if the Copy was placed anywhere preceding the Sort. This includes putting it as the second stage, following the query limits, and putting it immediately before the Sort. Anywhere following the Sort resulted in the immediate RC=70. In this Pipe, the primary stream builds records that eventually become the Detail records in a Lookup (really a Not Lookup, I am only interested in the unmatched details). The Lookup, which is several stages following the Sort, is the only stage in the that has a secondary input defined. The secondary output is not connected. There is no record delay in the stream that provides the Master records. I have two questions: 1. Why is the Copy or other stage required? I would have thought that the Sort stage would be sufficient as a consumer of records. After all, it cannot buffer the records without consuming them, can it? 2. Why did the diagnostic write, the >>, cause the Pipe to succeed? Does >> write and consume a record before sending it down the primary output stream? Pipe fragment follows: 'PIPE (end \)', '\ cms query limits all', '| drop 1', '| spec /listdir/ 1 w1 nw /./ n', '| cms', '| pick w1 ¬== /Fm/', '| spec /query auth/ 1 w2 nw', '| cms', ... '| sort', ... Regards, Richard Schuh The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
