Glenn, Thanks so much. I can see I've a lot to learn! I'll try these out when I'm back in the office tomorrow and let you (and the other readers) know.
Kind regards, Peter Bishop System Programmer – Mainframe -----Original Message----- From: CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU> On Behalf Of Glenn Knickerbocker Sent: Wednesday, March 6, 2019 15:48 To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: [CMS-PIPELINES] beginner's question: how can I process an empty pipe? On 2019-03-05 10:38 PM, Bishop, Peter wrote: > The question is: how can a get a message similar to "Unit not found" > to display, instead of nothing as happens now? When you're searching for something, the alternate outputs of LOOKUP can give you the unmatched records to process: PIPE (end /) cp q dasd free | split | strip , | find: lookup w2 w1 detail | console / var unit | find: / find: | insert ,Unit not found: , | console In general, when you want to replace an empty file with a message, you can use COUNT and look for a zero: PIPE (end /) ... | found: count lines | zero: fanin | ... / found: | pick w1 = ,0, | specs ,nothing here, 1 | zero: ¬R DXC Technology Australia Pty Limited; Registered Office: 26 Talavera Road, Macquarie Park NSW 2113 Australia; Incorporated in Australia ACN: 008 476 944. DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.