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

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

NCCF NETVIEW CNM01 OPER6 02/01/10 13:38:00<br />

* CNM01 PIPE NETVIEW D NET,CDRMS | CORRWAIT 60 | T<strong>OS</strong>TRING LAST 1.7<br />

/IST314I/| CONSOLE<br />

CNM01 IST097I DISPLAY ACCEPTED<br />

’ CNM01<br />

IST350I DISPLAY TYPE = CDRMS<br />

IST089I A01CDRM TYPE = CDRM SEGMENT , ACTIV<br />

IST482I A01M ACTIV, SA 1, EL 1, NETID = NETA<br />

IST482I A02M NEVAC, SA 2, EL 1, NETID = NETA<br />

IST482I A99M NEVAC, SA 99, EL 1, NETID = NETA<br />

IST482I B20M NEVAC, SA N/A, EL N/A, NETID = NETB<br />

IST314I END<br />

Processing steps:<br />

1. The NETVIEW stage executes the command to DISPLAY CDRMS and writes<br />

the messages to the output stream.<br />

2. The CORRWAIT stage allows a 60 second wait <strong>for</strong> messages to be returned<br />

from VTAM, resetting the timer as each message is received. When the<br />

CORRWAIT timer expires, further messages generated by the NETVIEW stage<br />

are not accepted into the pipeline.<br />

3. Be<strong>for</strong>e 60 seconds expire, the message DISPLAY ACCEPTED is passed to<br />

T<strong>OS</strong>TRING and the last (only) line is examined <strong>for</strong> the matching string. There<br />

is no match, so the message is passed to the output stream.<br />

4. Again, be<strong>for</strong>e 60 seconds expire, the MLWTO is passed to T<strong>OS</strong>TRING and<br />

because the last line of the MLWTO matches the delimited text string, the entire<br />

MLWTO is passed to the output stream. Because T<strong>OS</strong>TRING is satisfied, the<br />

T<strong>OS</strong>TRING stage terminates, making CORRWAIT also terminate, and ending<br />

the receipt of messages from the D NET,CDRMS command.<br />

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

Example 2: Processing Single-Line Messages Using T<strong>OS</strong>TRING<br />

This example shows how to use T<strong>OS</strong>TRING to search <strong>for</strong> a delimited string in a<br />

particular column range, within single-line messages. This example is shown as a<br />

REXX command list named DISP482I:<br />

/* DISP482I REXX command list */<br />

/* process PIPE command with T<strong>OS</strong>TRING stage<br />

’PIPE NETVIEW D NET,CDRMS’,<br />

*/<br />

’| CORRWAIT 60’, /* wait 60 seconds */<br />

’| SEPARATE’, /* split up MLWTO */<br />

’| T<strong>OS</strong>TRING 1.7 /IST482I/’, /* search <strong>for</strong> match */<br />

’| CONSOLE’<br />

SAY ’RC IS ’ RC<br />

EXIT<br />

/* display on screen */<br />

Output from DISP482I looks similar to:<br />

NCCF NETVIEW CNM01 OPER6 03/26/10 16:50:00<br />

* CNM01 DISP482I<br />

CNM01 IST097I DISPLAY ACCEPTED<br />

’ CNM01 IST350I DISPLAY TYPE = CDRMS<br />

’ CNM01 IST089I A01CDRM TYPE = CDRM SEGMENT , ACTIV<br />

’ CNM01 IST482I A01M ACTIV, SA 1, EL 1, NETID = NETA<br />

C CNM01 RC IS 0<br />

Processing steps:<br />

1. The NETVIEW stage executes the DISPLAY command and writes messages,<br />

which include an MLWTO to the output stream.

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

Saved successfully!

Ooh no, something went wrong!