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.

<strong>NetView</strong> Pipeline Filters<br />

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

Keeping or Discarding Matching Messages: LOCATE,<br />

NLOCATE<br />

The LOCATE stage keeps messages that contain specified text strings and discards<br />

messages that do not. Conversely, the NLOCATE stage discards messages that<br />

contain specified text strings and keeps messages that do not. You can specify up<br />

to 40 delimited strings, each with optional position and length to limit the column<br />

range of the search.<br />

Example 1: Keeping Messages that Contain a Specified Text String<br />

This example shows how to use the LOCATE stage to select single-line messages<br />

that contain a specified text string:<br />

PIPE NETVIEW LIST STATUS=TASKS | LOCATE /<strong>OS</strong>T/ | CONSOLE<br />

Output from the pipeline looks like this:<br />

NCCF NETVIEW CNM01 OPER6 05/17/10 13:38:00<br />

* CNM01 PIPE NETVIEW LIST STATUS=TASKS | LOCATE /<strong>OS</strong>T/ | CONSOLE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: OPER6 RESOURCE: A01A701 STATUS: ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A702 STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A703 STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A704 STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A705 STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A706 STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: RESOURCE: STATUS: NOT ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: AUTO1 RESOURCE: AUTO1 STATUS: ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: AUTO2 RESOURCE: AUTO2 STATUS: ACTIVE<br />

- CNM01 TYPE: <strong>OS</strong>T TASKID: DSILCOPR RESOURCE: DSILCOPR STATUS: ACTIVE<br />

Processing steps:<br />

1. The NETVIEW stage executes the LIST command and writes the results to the<br />

output stream as single-line messages.<br />

2. The LOCATE stage reads its input stream (output stream of the NETVIEW<br />

stage), examines the messages <strong>for</strong> occurrences of the <strong>OS</strong>T string, and writes all<br />

matching messages to the output stream discarding unmatched messages.<br />

3. The CONSOLE stage reads the messages and displays them.<br />

Example 2: Keeping Messages that Contain Multiple Text Strings<br />

This example shows how to use the LOCATE stage to select messages containing<br />

any one of the multiple text strings specified:<br />

PIPE NETVIEW LIST DEFAULTS | SEPARATE | LOCATE /LOG/ /DISP/| CONSOLE<br />

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

NCCF NETVIEW CNM01 OPER6 05/17/10 13:40:30<br />

* CNM01 PIPE NETVIEW LIST DEFAULTS | SEPARATE | LOCATE /LOG/ /DISP/ |<br />

CONSOLE<br />

’ CNM01 DWO654I DISPLAY DEFAULTS<br />

’ CNM01 SYSLOG: NO<br />

’ CNM01 NETLOG: YES<br />

’ CNM01 HCYLOG: YES<br />

’ CNM01 DISPLAY: YES

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

Saved successfully!

Ooh no, something went wrong!