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.

PIPE STEM and PIPE $STEM<br />

Usage Notes<br />

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

The default <strong>for</strong> (number) is zero (0).<br />

FROM<br />

Indicates a starting point <strong>for</strong> access to the stem variables. If FROM is specified,<br />

frNumber must also be specified. FROM can be used on stages that are first or<br />

not first.<br />

frNumber<br />

A positive number. When STEM is a first stage this is the number of the first<br />

stem variable written to the output stream. When STEM is not a first stage,<br />

this is the number of the first variable stored. Do not specify both FROM and<br />

APPEND.<br />

v When STEM is the first stage of a pipeline specification, the following conditions<br />

apply:<br />

– The maximum size of a message buffer output from the STEM stage is 32,000<br />

bytes. Message buffers exceeding 32,000 bytes are truncated to 32,000 bytes.<br />

– If the variable specified on the STEM stage has a record count that is not<br />

valid, the pipeline is rejected with message DWO206I, and the pipeline ends.<br />

The record count of the STEM variable must be zero, or positive, and less<br />

than 10.000,000.<br />

v When STEM is not the first stage of a pipeline specification, the following<br />

conditions apply:<br />

– The value of the count variable (name with '0' appended) is initialized to zero<br />

very early in pipeline initialization (unless APPEND is specified). If your<br />

pipeline fails to run because of an error or a RESET condition, this variable<br />

might have a value of zero, even though your pipeline was not processed.<br />

Likewise, if messages are not processed by STEM, the value of the count<br />

variable is zero.<br />

– Input messages to the STEM stage are inspected <strong>for</strong> message lines as follows:<br />

- An input stream containing a single message line causes two STEM records<br />

to be saved: one STEM variable containing the message, and one STEM0<br />

containing the record count.<br />

- An input stream containing a 10-line MLWTO causes 11 STEM records to<br />

be saved: one <strong>for</strong> each line of the MLWTO, plus one <strong>for</strong> STEM0 containing<br />

the record count.<br />

- An input stream consisting of a single-line message and a 10-line MLWTO<br />

causes 12 STEM records to be saved and so <strong>for</strong>th.<br />

v A much more efficient and predictable behavior is obtained when using<br />

COLLECT with the COMMON option. If STEM is a first stage, COLLECT must<br />

be specified on the STEM stage. If STEM is not a first stage, a COLLECT stage<br />

must precede the STEM stage.<br />

For example, if one task is updating the common global stem X. and your task<br />

is reading it, the following example might get some of the updated X. values<br />

and some of the older values:<br />

PIPE STEM (COMMON) X. | CONSOLE<br />

However, the following command gets all of the older values or all of the<br />

updated values.<br />

PIPE STEM (COMMON) X. COLLECT | CONSOLE<br />

v STEM ignores the structure of the messages it receives. Thus, 10 one-line<br />

messages set 10 stem records and one 10-line message also sets 10 stem records.

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

Saved successfully!

Ooh no, something went wrong!