Some queries, like CMS QUERY DISK and CP QUERY MDISK, have headers in
their responses that can't be suppressed.  When I run a list of queries,
I need to skip the header in each response.

If I can SET EMSG OFF and know a unique string in the response header,
then I can just skip the headers:

  ... | cp | strnfind "TargetId" | ...

Or, if EMSG is not OFF, I'll always have either the header or an error
message, so I can merge the response with a unique string for each query
and skip two lines:

  (end /) ... | query: chop 0 | pad 1 x | response: faninany
    | outside "x" 2 | ...
    / query: | cp | response:

If I don't control EMSG but do know a unique string in the header, I can
combine the two techniques:

  (end /) ... | query: chop 0 | pad 1 x | response: faninany
    | outside "x" "TargetId" | ...
    / query: | cp | response:

In the general case, though, I wind up either numbering the queries:

  (end /) ... | query: chop 0 | specs number 1 | response: juxtapose
    | header: unique 1.10 first
    / query: | cp | response:
    / header:| not chop 10 | ...

or just running a whole new pipeline for each one:

  (end /) ... | query: chop 0 | copy
    | specs "callpipe *..1: || take 1 || cp || drop 1 || *..1:"
    | issue: pipcmd
    / query: | issue: | ...

Have I overlooked a simpler way?

¬R

Reply via email to