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 Command<br />

went in, but only two came out. Without knowing exactly what stage was in effect,<br />

we cannot say <strong>for</strong> sure what happened to the third message, but we do know that<br />

such disappearances can be legitimate.<br />

Figure 3 shows a more explicit example. In this case, the stage specification is:<br />

LOCATE /BOB/<br />

LOCATE is a stage and its purpose here is to locate every occurrence of the string<br />

BOB in the data passing through the stage. Here, we see three messages flow into<br />

the stage. LOCATE looks at the content of each incoming message. If the incoming<br />

message contains the string BOB, the message remains in the pipeline. Otherwise,<br />

the message is removed from the pipeline.<br />

Input Messages Output Messages<br />

Bob Smith<br />

Fred Ford<br />

Mary Bobbit<br />

Locate /Bob/<br />

Stage<br />

Fred<br />

Ford<br />

Bit<br />

Bucket<br />

You can issue the <strong>NetView</strong> PIPE command anywhere you use a <strong>NetView</strong> regular<br />

(Type=R) command:<br />

v The <strong>NetView</strong> command line<br />

v A <strong>NetView</strong> command list<br />

v A REXX command list<br />

v A high-level-language command procedure such as PL/I or C<br />

v An environment that allows timer commands.<br />

In a PIPE command, stages are separated by a character called a stage separator.<br />

PIPE STAGE1 | STAGE2 | ... | STAGEn<br />

Bob Smith<br />

Mary Bobbit<br />

Figure 3. Messages Flowing through a LOCATE Stage<br />

Introduction and Concepts<br />

A stage separator placed be<strong>for</strong>e the first stage or after the last stage is optional.<br />

The default stage separator is the character X'4F'. Depending on your workstation,<br />

this stage separator is either a solid vertical bar (|) or a split vertical bar (¦).<br />

PIPE commands can be shown in two ways: the portrait <strong>for</strong>mat or the landscape<br />

<strong>for</strong>mat. In portrait <strong>for</strong>mat, parameters are stacked vertically in the manner shown<br />

in Figure 4 on page 4. In landscape <strong>for</strong>mat, parameters are strung horizontally as<br />

shown in Figure 5 on page 4. When entering a PIPE command from the command<br />

line, you might prefer landscape <strong>for</strong>m. When issuing a PIPE command from a<br />

command procedure, you might prefer the portrait <strong>for</strong>m. Either <strong>for</strong>m, or any<br />

combination of the two, is valid.<br />

Chapter 1. <strong>NetView</strong> Pipelines Introduction and General Concepts 3

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

Saved successfully!

Ooh no, something went wrong!