Starting with: CP QUERY PATHS 0-FFFF

Filtering to remove those groups of records who are both:  "status ONLINE"  AND 
 "show a '+' for every CHPID"

(So those to be removed would be the "Good/Working" devices, essentially.)



Any group of records where the first record is NOT "Device xxxx, Status ONLINE" 
(of which there are 7 other statuses (statii?)), then that group should be kept 
 for output.



According to HELP CP QUERY PATHS there could potentially be up to 9 records 
with +/- for each CHPID, each with their own individual header:

Physically Available (PAM)  :  +/-    +/-

Online               (LPM)  :  +/-    +/-

Preferred                   :  +/-    +/-

Offline by Authorized User  :  +/-    +/-

Offline by ESCON Manager    :  +/-    +/-

Out of Path Group by Guest  :  +/-    +/-

Offline by Control Unit     :  +/-    +/-

Offline, Wrong CU Connection:  +/-    +/-

Transport Mode Supported    :  +/-    +/-



If the first record says "Device xxxx, Status ONLINE" but there exists even one 
"-" in those lines intervening between the first and last (which is always 
"Legend", until removed at any rate) then I want to keep that group of records 
for output.





Because CP QUERY PATH outputs records subsequent to the first in each group as 
prefixed with a space, the 'joincont leading / / x15' proposed by Sir Rob 
sounds a mighty fine suggestion.

So it could more or less boil down to something like this, perhaps:



'PIPE (end ? name querypath listerr)' ,

   'CP QUERY PATH 0-FFFF' ,

   '|    NFIND _______________________Legend' , /* No Legend line.*/

   '|    JOINCONT LEADING / / X1540' ,          /* Join the grouped outputs for 
filtering.*/

   '| a: NLOCATE  /Status ONLINE/' ,            /* Filter out working rdevs.*/

   '| b: FANINANY' ,

   '|    CONSOLE' ,                             /* The X15 are translated into 
line-breaks.*/

'?a:|    LOCATE   /-/' ,                        /* Keep any ONLINE rdev who 
have offline CHPIDs.*/

   '| b:'





--Shawn S.





-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On 
Behalf Of Rob van der Heij
Sent: Friday, March 24, 2017 3:09 PM
To: CMS-PIPELINES@VM.MARIST.EDU
Subject: Re: [CMS-PIPELINES] Pipethink and filtering. CP QUERY PATHS 0-FFFF



> 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.



I am often wrong, but why go all that way to mimic a built-in stage? You can do 
all that with joincont from what I see.



So I understand we're after showing the original CP response for that device, 
just have not heard what 'that device' would be. Is it when the signs for (LPM) 
don't match (PIM) or when there ar any '-' sings on (LPM), or what?



Sir Rob the Plumber

Reply via email to