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.

Examples<br />

v Multiple streams cannot be input to a single STEM stage. The FANIN stage can<br />

be used to collapse multiple streams into a single output stream, which can be<br />

used as input to STEM. See “PIPE FANIN” on page 125 <strong>for</strong> more in<strong>for</strong>mation<br />

about FANIN.<br />

v If the value of the count variable (name with '0' appended) was not set <strong>for</strong> TASK<br />

and COMMON variables, the value of the count variable is null. However, a<br />

null value is handled the same way as if the count variable had been set to zero<br />

(0).<br />

Example: Writing to Stemmed Variables<br />

If a <strong>NetView</strong> command list named PRIME runs as a result of <strong>NetView</strong> automation,<br />

the command list drives a second command list named SECND. You can give<br />

SECND the same access to the message that called PRIME, and save all output<br />

data to PRIME's variable SSLT (in REXX), by entering:<br />

PIPE SAFE *<br />

| NETVIEW SECND<br />

| STEM SSLT.<br />

Example: Saving the Count of Records Processed<br />

In this example, the CNMCMD file is read into the pipeline and saved to the<br />

STEM variable named A. When the pipeline completes, the record count in A0<br />

indicates the number of lines read from CNMCMD.<br />

/* REXX COMMAND LIST */<br />

’PIPE < CNMCMD INCL’,<br />

’| STEM A’<br />

SAY ’THERE ARE ’ A0 ’ LINES IN CNMCMD.’<br />

PIPE STEM and PIPE $STEM<br />

For examples of using $STEM, see the WINDOW command list (CNME1505).<br />

Chapter 2. Pipeline Stages and Syntax 229

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

Saved successfully!

Ooh no, something went wrong!