28.11.2012 Views

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PIPE COLLECT<br />

Examples<br />

42 <strong>Programming</strong>: <strong>Pipes</strong><br />

message. When COLLECT is used without arguments, COLLECT does not<br />

produce output until the previous stage disconnects.<br />

v The message attributes of an output message from COLLECT is derived from<br />

the first message included in that output. For example, if the first message<br />

received by COLLECT had a JOBNAME of TSU00041, then the entire multiline<br />

output bears that same JOBNAME regardless of the origin of the subsequent<br />

lines.<br />

v COLLECT does not alter the message type (HDRMTYPE) of the lines it collects.<br />

This means that the output is not necessarily one of the types J, K, or L as was<br />

the practice in early releases of the <strong>NetView</strong> program.<br />

v COLLECT can cause a complex pipeline to become deadlocked or clogged. For<br />

in<strong>for</strong>mation on resolving clogged pipelines, see “Clogged Pipelines” on page<br />

346.<br />

Example: Converting Single-Line Messages to Multiline<br />

To present the output of LIST STATUS=TASKS as a multiline message, enter:<br />

PIPE NETVIEW LIST STATUS=TASKS<br />

| COLLECT<br />

| CONSOLE<br />

The many single-line messages issued by LIST are saved by COLLECT until all<br />

output of the NETVIEW stage has been gathered. Then a single MLWTO is<br />

produced. If this stage is running in a remote autotask (using RMTCMD), then the<br />

processing ef<strong>for</strong>t <strong>for</strong> the network is far less <strong>for</strong> the one multiline message than <strong>for</strong><br />

the many single-line messages.<br />

Example: Displaying Multiline Messages and Preserving Output<br />

Structure<br />

In the following example the 'IST350I DISPLAY TYPE = LINES' is removed without<br />

disturbing the multiline structure of the output; IST097 is by itself and the others<br />

are together.<br />

PIPE CORRCMD D NET,LINES<br />

| SEPARATE<br />

| NLOCATE 1.7 /IST350I/<br />

| COLLECT ASBEFORE<br />

| CONSOLE<br />

---> IST097I DISPLAY ACCEPTED<br />

---><br />

IST354I PU T4/5 MAJOR NODE = NT7EVTAM<br />

IST172I NO LINES EXIST<br />

IST231I CA MAJOR NODE = NT7ECTCA<br />

IST170I LINES:<br />

IST080I CTCALN7E ACTIV----E<br />

IST314I END<br />

See also the example in the LOGPROF1 stage list (CNME1049).<br />

Example: Formatting LIST STATUS=TASKS Output<br />

In the following example the common in<strong>for</strong>mation contained in all LIST<br />

STATUS=TASKS messages, normally found in each output line, is presented in<br />

multiple label lines be<strong>for</strong>e presenting the data.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!