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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 4. <strong>NetView</strong> Pipeline Filters<br />

This chapter describes general-use programming interface and associated guidance<br />

in<strong>for</strong>mation. For in<strong>for</strong>mation about using pipelines in high-level languages, see<br />

<strong>IBM</strong> <strong>Tivoli</strong> <strong>NetView</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Programming</strong>: PL/I and C.<br />

A filter is a stage that reads messages from its input stream, manipulates them,<br />

and writes the results to its output stream. One common use of a filter is to select<br />

or discard messages based on some search or positional criteria. The difference<br />

between a filter and a device driver is that a filter does not interact with devices or<br />

other system resources, as device drivers do.<br />

The output stream from a filter stage can be far different from the data read from<br />

the input stream. By stringing filters together, you can trans<strong>for</strong>m raw data into<br />

useful results.<br />

This chapter describes filters that:<br />

v Manipulate messages<br />

v Select messages by content<br />

v Select messages by position<br />

v Discard messages from the pipeline<br />

Manipulating Messages: SEPARATE, COLLECT<br />

<strong>NetView</strong> Pipelines includes stages that can modify messages in the pipeline.<br />

You can:<br />

v Separate multiline messages into multiple single-line messages (SEPARATE)<br />

v Collect multiple single-line messages into a multiline message (COLLECT).<br />

Breaking Up an MLWTO: SEPARATE<br />

The SEPARATE stage allows the user to break a multiline write-to-operator<br />

(MLWTO) message into single-line messages, each of which inherits the attributes<br />

of the MLWTO.<br />

Example: Separating an MLWTO into Single-line Messages<br />

This example shows how to use the SEPARATE stage to break the MLWTO created<br />

by the NETVIEW stage into single-line messages:<br />

PIPE NETVIEW MVS D A,L | CORRWAIT 20 | SEPARATE | CONSOLE<br />

Output from the pipeline looks similar to:<br />

© Copyright <strong>IBM</strong> Corp. 1997, 2011 303

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

Saved successfully!

Ooh no, something went wrong!