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

Syntax<br />

FANIN:<br />

FANIN<br />

Command Description<br />

The FANIN stage reads from multiple input streams. Unlike FANINANY, which<br />

reads multiple input streams simultaneously, FANIN reads from the first stream<br />

until that stream disconnects. FANIN then reads from the next input stream until it<br />

disconnects and so on. All data read by FANIN is passed to a single output stream.<br />

Streams<br />

Stream Type Number Supported<br />

Input 10<br />

Output 1<br />

Termination Conditions<br />

FANIN terminates when all input streams disconnect or the output stream<br />

disconnects.<br />

Operand Descriptions<br />

This stage has no operands.<br />

Usage Notes<br />

Examples<br />

PIPE FANIN<br />

v The primary input stream is the first to be processed. Additional input streams<br />

are delayed until processing is completed <strong>for</strong> the primary input stream.<br />

v FANIN enables you to write output to a single stem variable from multiple<br />

places within a single pipeline.<br />

Example: Process a List of Names<br />

In this example, a list of names is read from a data set member. All individuals<br />

with the name SMITH are checked <strong>for</strong> the name TOMMY. All names containing<br />

SMITH and TOMMY result in TOMMY being changed to TOM. Because the<br />

processing of records containing SMITH is the primary input to FANIN, all records<br />

containing SMITH are placed in the NAMES. stem, first.<br />

Next, all records containing BAKER are truncated after 22 characters. The<br />

truncated records are input to FANIN and subsequently placed in the NAMES.<br />

stem.<br />

Finally, all other names that are not SMITH or BAKER are processed by FANIN<br />

and placed in the NAMES. stem.<br />

Chapter 2. Pipeline Stages and Syntax 125

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

Saved successfully!

Ooh no, something went wrong!