Perfect for a sipping stage I thought when I read the initial post, before seeing the "pure pipes" preference; then I wondered if an equivalent could be accomplished with pipcmd. Attempting - Address Command 'PIPE (end ?) cp Q PATHS E1D8-E1DB', '|a:Take last', /* legend line? */ '|b:gate', '?Literal CallPipe (End ??) *.in.1:', '||aa:drop 1', '||Strtolabel /Device/', '||cc:Faninany', '||join * /;/', /* process one group here */ '||*.out.0:', '??aa:', '||cc:', '|dup *', '|b:', '|c:pipcmd', '|cons', '?a:|c:' produced the expected output then hung, apparently in a loop. Gate doesn't seem to be firing. Placed a Cons stage between the take last and the gate and sure enough the last (Legend) line doesn't appear.
One could argue that I need to add "strict" to gate, and I did to no avail as the last record of the cp stage's output still wasn't being passed. Finally changed the "dup *" to a small number, though still greater than the expected number of iterations. Address Command 'PIPE (end ?) cp Q PATHS E1D8-E1DB', '|a:Take last', /* legend line? */ '|cons', '|b:gate strict', '?Literal CallPipe (End ??) *.in.1:', '||aa:drop 1', '||Strtolabel /Device/', '||cc:Faninany', '||join * /;/', /* process one group here */ '||StrLit ifempty /past eof/', '||*.out.0:', '??aa:', '||cc:', '|dup 7', '|b:', '|c:pipcmd', '|cons', '?a:|c:' Exit Rc And I now get the desired 4 lines of output (as there are only 4 devices in the range used), followed by 4 lines of "past eof" and finally the "Legend" line. So.... why is the take stage holding the last record, when the cp stage must be at eof? A copy stage inserted in the last line "?a:|copy|c:" to ensure the penultimate line was sucked off also didn't help. What am I missing? Thanks, -- 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/23/2017 02:39:47 PM: > From: Rob van der Heij <robvdh...@vnet.ibm.com> > To: CMS-PIPELINES@VM.MARIST.EDU > Date: 03/23/2017 02:56 PM > Subject: Re: Pipethink and filtering. CP QUERY PATHS 0-FFFF > Sent by: CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU> > > > Juxtapose - if you have a group of records that aren't easy to > tell they're associated, make it so they are. > > Sure, and lookup :-) > > I don't have a picture of your expected output yet. Some generai ideas: > > You can group the records per device into a chunk with something like > 'joincont leading / / x15' > and still be able to reconstruct the lines. > > If you use 'fanout' to have a copy of the original records. Rather than > identify the good one,s you might be able to identify the bad ones. If > nothing else you might split the streams by (PIM) etc tags and use a > 'combine' stage to recognize a mix (e.g. all '-' or '+' stays like that, > but a mix would result in '>'). If necessary use 'xlate' to pick elegant > code points for the '+' and '-' signs. > > Something I like is to use 'predselect' to throw out or select records > when you may have more than one trigger. So you'd have 'predselect' > pass or reject the "chunked" records based on whether the detailed > analysis gave a reason to reject. > > If nothing else, you can certainly write yourself a sipping pipeline in > REXX and process each chunk on its own. > > Sir Rob the Plumber >