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.

PIPE LOOKUP<br />

Syntax<br />

LOOKUP:<br />

►<br />

LOOKUP<br />

1.*<br />

detail_position.length reference_position.length<br />

APPEND WILDCARD /xyz/<br />

Command Description<br />

The LOOKUP stage compares two input streams and indicates on its output<br />

streams whether a match was found.<br />

Streams<br />

Data is read from the secondary input stream until it disconnects. The records read<br />

on the secondary input stream are called reference records. The data supplied on<br />

the primary input stream is compared to these reference records.<br />

After the secondary input stream disconnects, data is read from the primary input<br />

stream. The records read on the primary input stream are called detail records.<br />

Each detail record is compared to the reference records. If the detail record matches<br />

a reference record, the input message containing the detail record is written to the<br />

primary output stream. Otherwise, it is written to the secondary output stream.<br />

The detail record data stream is not delayed.<br />

If the detail record is a multiline message, only the first line of the message is<br />

compared to the reference records. If a match is found, the entire multiline<br />

message is written to the primary output stream. If a match is not found, the entire<br />

multiline message is written to the secondary output stream.<br />

When all detail records have been processed and the primary input stream<br />

disconnects, LOOKUP writes all reference records that were not matched to any<br />

detail record to the third output stream.<br />

One use <strong>for</strong> LOOKUP is to compare a new data stream to an old data stream to<br />

determine added, deleted, or unchanged lines.<br />

Stream Type Number Supported<br />

Input 2<br />

Output 3<br />

Termination Conditions<br />

LOOKUP ends when all input and output streams are disconnected.<br />

PIPE LOOKUP<br />

Chapter 2. Pipeline Stages and Syntax 159<br />

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

Saved successfully!

Ooh no, something went wrong!