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

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

PIPE LITERAL % JACK BE NIMBLE % | CONSOLE<br />

Output from the pipeline using the LITERAL stage follows:<br />

NCCF NETVIEW CNM01 OPER5 03/01/10 09:13:24<br />

* CNM01 PIPE LITERAL % JACK BE NIMBLE % | CONSOLE<br />

| CNM01 JACK BE NIMBLE<br />

Processing steps:<br />

1. The LITERAL stage writes the JACK BE NIMBLE text string to the output stream.<br />

2. The CONSOLE stage reads its input and displays the message.<br />

Example 2: Inserting Text Containing Command List Functions<br />

This example, in a REXX command list named DISPOPID, shows how to use the<br />

LITERAL stage to add a message containing a REXX function to the pipeline:<br />

/* REXX COMMAND LIST - DISPLAY OPERATOR ID */<br />

’PIPE LITERAL !My OPID is’, /* Add text to pipe */<br />

OPID()’!’, /* Get my operator ID */<br />

’| CONSOLE’<br />

EXIT<br />

/* Display to terminal */<br />

Output from DISPOPID follows:<br />

NCCF NETVIEW CNM01 OPER5 03/26/10 09:15:10<br />

* CNM01 DISPOPID<br />

| CNM01 MY OPID IS OPER5<br />

Processing steps:<br />

1. The LITERAL stage writes the MY OPID IS text string to the output stream<br />

along with the REXX OPID function results.<br />

2. The CONSOLE stage reads its input and displays the messages on the screen.<br />

Example 3: Inserting Multiple Text Strings<br />

This example shows how to use the LITERAL stage to add multiple text strings to<br />

a pipeline:<br />

PIPE LITERAL ? This is the CCC message ?<br />

| LITERAL / This is the BBB message /<br />

| LITERAL ! This is the AAA message !<br />

| CONSOLE<br />

Output from the pipeline follows:<br />

NCCF NETVIEW CNM01 OPER5 05/02/10 10:40:10<br />

* CNM01 PIPE LITERAL ? THIS IS THE CCC MESSAGE ? | LITERAL / THIS IS THE<br />

BBB MESSAGE / | LITERAL ! THIS IS THE AAA MESSAGE ! | CONSOLE<br />

| CNM01 THIS IS THE AAA MESSAGE<br />

| CNM01 THIS IS THE BBB MESSAGE<br />

| CNM01 THIS IS THE CCC MESSAGE<br />

Processing steps:<br />

1. The first LITERAL stage writes the CCC message text string to the output<br />

stream.<br />

2. The second LITERAL stage writes the BBB message text string to the output<br />

stream in front of the CCC text already in the stream.

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

Saved successfully!

Ooh no, something went wrong!