Been working on developing my Pipethink, but this scenario has me stumbling.

Taking "CP QUERY PATHS 0-FFFF" and filtering so that only those with potential 
problems (those who are NOT:  "status ONLINE"  AND  "show a '+' for every 
CHPID") get output to console.
The more I poke at this, the more complex it gets.

"CP QUERY PATHS" , according to the HELP file:
- Each output has from 5 up to and including 12 records/lines total. 
- Each of the potential lines is a known template, and the first four are 
always present and always the first four.
- The only record I don't really care about is the "Legend", which is always 
the last record in each output.
- In the first record of each output, the "Status xxxx" could have 1 of 8 
conditions for "xxxx".
- Records/lines 3-11 (inclusive) could contain either a "+" or "-" for each 
CHPID (up to 8 total).

If I'm just starting out by 'PIPE CP QUERY PATHS 0-FFFF', then I get a QUERY 
PATHS output for each device successively.

The first problem is: 
How can I keep these successive outputs in order, but still work with each 
output as a group when the number of records in the individual outputs is 
variable?

My first thought is to use JOIN so I can then filter the groups of records 
based on criteria.  But I only know with certainty the first and last records 
of each output group, the number of records is variable in each group, and 
there doesn't seem to be any easy way to otherwise distinguish one group from 
the next.
If the JOIN stage could accept a from-label and a to-label that would solve the 
issue, so a user-made stage could be one solution.  But I feel like there's got 
to be a better solution using just the built-in stages...

I've found an imperfect solution by reducing the outputs to just their first 4 
lines using an ALL stage and then a "JOIN 3".  
I know BETWEEN/INSIDE would be better, but no idea how I'd JOIN in that case... 
 I'm really trying to avoid a "JOIN *".

Any thoughts?

--Shawn S.

Reply via email to