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> Pipelines Device Drivers<br />

This example shows how to use the < stage to read records from the CNME1035<br />

member associated with ddname DSICLD.<br />

PIPE < DSICLD.CNME1035 | LOCATE /STARTCNM/ | CONSOLE<br />

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

NCCF NETVIEW CNM01 OPER6 04/14/10 15:26:40<br />

* CNM01 PIPE < DSICLD.CNME1035 | LOCATE /STARTCNM/ | CONSOLE<br />

| CNM01 STARTCNM ALL<br />

Processing steps:<br />

1. The < stage, reads the records from the member named CNME1035 associated<br />

with the DSICLD ddname. The records are converted to single-line messages<br />

and placed in the pipe.<br />

2. The LOCATE stage selects all messages that have the text string STARTCNM and<br />

places them in the pipe.<br />

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

Accessing Variables within Command Procedures: VAR, STEM, SAFE<br />

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

Several device drivers read and write variables in a command procedure<br />

environment.<br />

You can:<br />

v Read from or write uniquely named variables (VAR)<br />

v Read from or write to stem variables (STEM)<br />

v Read from or write to the command procedure message queue (SAFE).<br />

Reading from or Writing to Named Variables: VAR<br />

The VAR stage enables the user to read records from, or write records to, variables<br />

in a command procedure variable pool.<br />

When used as a first stage, VAR reads variables from a command procedure<br />

variable pool into the pipeline. As anything other than the first stage, VAR writes<br />

single-line messages or lines of a MLWTO to uniquely named variables.<br />

Example: Working with a Variable<br />

In this example, command list PIPEVAR illustrates how to use the VAR stage in a<br />

pipeline to write a message to a variable. Another pipeline is then used to read the<br />

variable and display it.<br />

********************************************************************<br />

PIPEVAR CLIST<br />

&CONTROL ERR<br />

********************************************************************<br />

* NETVIEW command list language **<br />

********************************************************************<br />

PIPE NETVIEW DISPFK +<br />

| SEPARATE +<br />

| LOCATE /PA3/ +<br />

| VAR CLVAR1<br />

*<br />

*<br />

PIPE VAR CLVAR1 +<br />

| LITERAL /PA3 IS:/ +<br />

| CONSOLE<br />

*

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

Saved successfully!

Ooh no, something went wrong!