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

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

added. Contains all the lines in new. which are not in old.<br />

deleted.<br />

Contains all the lines which were in old. but are not in new.<br />

unchanged.<br />

Contains all the lines which are in both old. and new.<br />

/* REXX Fragment - Assume stems old. and new. already created */<br />

’PIPE (NAME LKUPXMP END %)’,<br />

’| STEM new.’,<br />

’| MIX: LOOKUP’,<br />

’| STEM unchanged.’, /* from new. that matched line from old.*/<br />

’% MIX:’, /* connect secondary output from lookup */<br />

’| STEM added.’, /* from secondary--from new. unmatched */<br />

’% STEM old.’, /* this STEM is a first stage! */<br />

’| MIX:’, /* connect TWO streams of LOOKUP! */<br />

’| STEM deleted.’ /* from old. with no match in new. */<br />

Notes:<br />

1. STEM old. immediately follows an end character making it the first stage of the<br />

subsequent simple pipeline.<br />

2. The MIX: label between the STEM old. and STEM deleted. stages acts as a<br />

connector to the MIX: LOOKUP stage.<br />

v Being that MIX: has an input stream, MIX: connects it to the MIX: LOOKUP<br />

stage which defined the MIX: label. The input stream is connected as the next<br />

available input stream, which in this case is the secondary input stream.<br />

v Being that MIX: has an output stream, MIX: connects it to the MIX: LOOKUP<br />

stage which defined the MIX: label. The output stream is connected as the<br />

next available output stream, which in this case is the tertiary output stream.<br />

So, the secondary input <strong>for</strong> LOOKUP is STEM old. and the tertiary output <strong>for</strong><br />

LOOKUP is STEM deleted.<br />

For a clearer understanding of the connections involved in this example, see the<br />

output generated after you change the second stage to MIX: (DEBUG) LOOKUP.<br />

3. If you wanted STEM deleted. to contain line numbers from STEM old. instead<br />

of the data, you can add the following stage immediately be<strong>for</strong>e to the STEM<br />

deleted. stage:<br />

EDIT LINECOUNT 1<br />

IDLEOFF Example<br />

See CLIST CNME1057 (IDLEOFF) <strong>for</strong> an example of LOOKUP with WILDCARD.<br />

This example edits the detail records to facilitate wildcard pattern matching. The<br />

data is then edited to return the data to its original <strong>for</strong>m.

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

Saved successfully!

Ooh no, something went wrong!