It will only work if the two words are separated by exactly the number of blanks in the pick stage. If the record was "XX YY Banana", it would be passed to the next stage. To handle a variable number of blanks requires something more:
'PIPE (end ?) < input-file|p: not pick w1 == ,XX,|f: faninany|> output-file?p: not pick w2 == ,YY,|f:' Now a question for those more deeply involved in Pipelines than me, is there any advantage, other than perceived beauty, of using the "not pick wn == ,XX," construct vs. "pick wn ^== ,XX,"? I would think not, but I may be wrong. The two would both do the same comparison and send the records down the same streams. I can see the advantage of having a visually simpler pipe by using "not lookup autoadd" when only the records that become the masters are wanted. Regards, Richard Schuh > -----Original Message----- > From: The IBM z/VM Operating System > [mailto:[email protected]] On Behalf Of Rob van der Heij > Sent: Thursday, October 22, 2009 2:33 PM > To: [email protected] > Subject: Re: Delete cms file record using PIPE > > On Thu, Oct 22, 2009 at 11:22 PM, Gonen Shoham > <[email protected]> wrote: > > I have a CMS file in which I need to delete lines that meet > specific > > criteria. > > > > For example - > > > > Delete all line where (word,1) = 'XX' and (word,2) = 'YY' > > > > > > Can someone suggest a way to perform this task using PIPES ? > > Deleting lines is only through writing the file again, but > skip the unwanted lines. > > PIPE < input file | not pick w1-2 == ,XX YY, | > output file a > > This is very much cheating, because it exploits the fact that > your check words are adjacent. For a general approach to > handle more complicated criteria you would need to look at > multi-stream pipelines > > Rob >
