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.

<strong>NetView</strong> Pipelines Device Drivers<br />

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

Partial (page 1) output from PIPSTEMA looks like this. Output continues until the<br />

contents of BFRUSE.54 are displayed.<br />

NCCF NETVIEW CNM01 OPER6 09/20/10 16:49:11<br />

* CNM01 16:49:11 PIPSTEMA<br />

C CNM01 16:49:11 BFRUSE.0 IS 54<br />

C CNM01 16:49:11 BFRUSE.1 IS IST097I DISPLAY ACCEPTED<br />

C CNM01 16:49:11 BFRUSE.2 IS IST350I DISPLAY TYPE = BUFFER POOL DATA<br />

C CNM01 16:49:11 BFRUSE.3 IS IST920I IO00 BUFF SIZE 00567 EXP<br />

.<br />

INCREMENT 00007<br />

Processing steps:<br />

1. The NETVIEW stage processes the DISPLAY command and, instead of<br />

displaying messages on the screen, writes them to the pipeline.<br />

2. The CORRWAIT stage waits 25 seconds <strong>for</strong> each related message.<br />

3. The T<strong>OS</strong>TRING stage selects all messages up to and including the last line of<br />

an MLWTO in which the text string END is found.<br />

4. The STEM stage writes the messages to variables named BFRUSE1, BFRUSE2,<br />

BFRUSE3, and so <strong>for</strong>th. BFRUSE0 contains an integer count of the total number<br />

of stem variables.<br />

Example 2: Reading from Variables Using STEM<br />

This example shows how to use the STEM stage, as a first stage, to read variables<br />

into the pipeline. It is shown in a REXX command list named PIPSTEMB.<br />

/* REXX COMMAND LIST PIPSTEMB */<br />

ADDRESS NETVASIS<br />

A.1= ’APPLES’<br />

A.2= ’PEARS’<br />

A.3= ’ORANGES’<br />

A.0=3<br />

’PIPE STEM A. | CONSOLE’<br />

IF RC ¬= 0 THEN<br />

SAY ’RC=’RC’ FROM PIPE ’<br />

EXIT<br />

Output from PIPSTEMB follows:<br />

NCCF NETVIEW CNM29 OPER6 03/01/10 19:16:00<br />

* CNM29 PIPSTEMB<br />

| CNM29 APPLES<br />

| CNM29 PEARS<br />

| CNM29 ORANGES<br />

Processing steps:<br />

1. The STEM stage reads the variables A.1, A.2, and A.3 into the pipeline. Each<br />

variable read is changed into a message. The variable A0 indicates that there<br />

are 3 variables to be read.<br />

2. The CONSOLE stage displays the messages.<br />

Example 3: Writing a Null Message to a Variable Using STEM<br />

This is an example of using the STEM stage to write a null message in the pipeline<br />

to a variable. It is shown in a REXX command list called PIPSTEMC.

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

Saved successfully!

Ooh no, something went wrong!