Simple case of "sipping" pipeline: 'PIPE (End ?)', '<' infile, '|pck:rexx *.1:', '|Cons', '?Literal /* */ Signal On error;', 'Do forever; "Peekto";', /* test if any input */ '"CallPipe *:||FromTarget Pick 5.2 == /99/ || take 4|| *:";', 'End; Error: Exit Rc*(Rc<>12)', '|pck:'
-- Mike Harding z/VM System Support mhard...@us.ibm.com mikehard...@mindless.com (925) 672-3922 | (925) 672-4403 (h) (925) 323-2070 (m) /sp CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU> wrote on 03/02/2018 09:31:01 AM: > From: "Stanislawski, Shawn (National VM Capability)" <shaw...@dxc.com> > To: CMS-PIPELINES@VM.MARIST.EDU > Date: 03/02/2018 09:32 AM > Subject: Selecting multiple record chunks > Sent by: CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU> > > I've got some data, within it reside multiple record chunks that I want. > The desired record chunks are randomly spaced within the data. The > desired record chunks are composed of 4 consecutive records. > The record chunks all start with records whose column 5 & 6 contain > the characters "99", and then just include the next 3 records (which > may or may not contain "99" at column 5 & 6). > Outside of the desired record chunks no other records contain > characters "99" in column 5 & 6. > The four records of each record chunk are consecutive in the data, > but have no common elements or other relation. And the fifth record > could be anything: there's no dedicated end string (even within the > 4 records themselves). > > I've included a sampling of data below. > Records 3, 10, 18 contain "99" at column 5 & 6. > So the desired output would contain only records 3,4,5,6,10,11,12, > 13,18,19,20,21 > > Any ideas? > > > 4L3XEBFVWYR6 > 5O1SLFG7AILX > 4BW699ETK82T > S9SK9DIER6L5 > G3AHUKPA4H3I > Q8ZLYL8G46JY > COB8GJK1AE5N > 78MKNQJ8MA6S > 917JZQ33CXOI > OQN699MQ60GQ > Z8VOSOZH6V7L > VC9V78SK49YS > L0PI3TLT7PGC > GFI4QQB1OPA6 > YUBSPLB73SFG > O7NNK3B20GJD > 3YPU0MCNSMZN > R4C899NNU9UB > FIZK74USTG8F > OF88HQGAOL3S > I4O29VT3BMG6 > HPXNGMQQK01G > CUBL7RY00CIQ > OBR4YA3Y9GF8 > D28H3IA7PKAX > > > --Shawn S.