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.

PIPE STEM and PIPE $STEM<br />

PIPE STEM and PIPE $STEM<br />

Syntax<br />

STEM<br />

►►<br />

STEM<br />

$STEM<br />

(0)<br />

(number)<br />

(COMMON)<br />

(TASK)<br />

stemroot<br />

COLLECT<br />

Command Description<br />

The STEM stage can be used anywhere in the pipeline.<br />

Streams<br />

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

FROM 1<br />

FROM frnumber<br />

APPEND<br />

When STEM is the first stage, it reads records from an array of stemmed command<br />

procedure variables. Each record is passed as a single-line message to the pipeline<br />

output stream.<br />

When STEM is not the first stage, it writes each line of each message to a variable<br />

within a stemmed array of command procedure variables and to the output<br />

stream. In addition, an integer is appended to the given variable name (<strong>for</strong><br />

example, VARNAMEn). The number represents the position of the message line<br />

being processed. For instance VARNAME1 is the first line, VARNAME2 is the<br />

second line. When all lines are processed, a variable with a zero appended<br />

(VARNAME0) is written to the variable pool, but not to the output stream. This<br />

variable contains the total number of all lines that were processed.<br />

Thus, if VARNAME1,VARNAME2, and VARNAME3 are created containing messages<br />

1, 2, and 3 respectively, VARNAME0 contains the number 3.<br />

The use of the STEM stage is limited to the command procedure environments<br />

(REXX, <strong>NetView</strong> command list language, and HLL). However, if the (COMMON)<br />

or (TASK) option is used, STEM can be invoked from message automation, by<br />

command originating at the PPT task or an optional task, or by using a labeled<br />

command originating in a command procedure. Use of the STEM stage outside of<br />

these environments results in message DSI290I and termination of the pipeline.<br />

By contrast, the VAR stage reads and writes to uniquely named variables that do<br />

not represent an array.<br />

The $STEM stage is the same as STEM, except that it also reads or writes the<br />

VIEW attribute variables (which start with $) that are associated with the specified<br />

array of stemmed data variables. When $STEM is the first stage, the color and<br />

highlighting specified in the attribute variables are translated to the output<br />

messages. When $STEM is not the first stage, the color and highlighting attributes<br />

specified in the input messages are translated to the attribute variables.<br />

Stream Type Number Supported<br />

Input 1<br />

Output 1<br />

►◄

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

Saved successfully!

Ooh no, something went wrong!