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.

Example: Understanding Error Messages<br />

Assume that the preceding example is changed so that the variable X.3 used to<br />

build the TAKE stage is misspelled as TAK. The following error messages are<br />

displayed.<br />

DWO364E PIPELINE TERMINATED. NO STAGE TAK EXISTS.<br />

DWO362E PIPELINE TERMINATED. ERROR IN<br />

STAGE 10003 IN PIPELINE "INNER"<br />

The stage number is:<br />

(3) + ((10000)(1)) = 10003<br />

because TAKE is the third stage inserted by the INTERPRT stage in the pipeline<br />

specification and INTERPRT is the first stage in its (inner) pipeline specification.<br />

Example: Running a Large Pipeline<br />

In this example, there is a large pipeline specification saved in member LGPIPE of<br />

partitioned data set DSICLD. There must be one stage specification per record. To<br />

run the pipeline, enter:<br />

PIPE (NAME OUTPIPE) < DSICLD.LGPIPE<br />

| COLLECT<br />

| NETVIEW PIPE (NAME INPIPE) INTERPRT *<br />

| LOGTO HCYLOG<br />

The stages are read from the member and collected. The NETVIEW stage makes<br />

this data the current message while running the command PIPE INTERPRT *. The<br />

INTERPRT stage reads the records and inserts them into the inner pipeline<br />

specification. The inner pipeline then runs. If there is any output from the inner<br />

pipeline from a CONSOLE stage, that output is trapped by the outer pipeline and<br />

passed to the next stage. In this case, the output is written to the hardcopy log.<br />

You can add stages to the beginning or end of a pipeline specification that is to be<br />

interpreted. In the preceding example, you can replace PIPE (NAME INPIPE)<br />

INTERPRT * with this:<br />

PIPE (STAGESEP % NAME INPIPE) LITERAL /SOME INPUT/<br />

% INTERPRT *<br />

% COLLECT<br />

% CONSOLE<br />

To the stages already defined in the member, you have added a first stage<br />

(LITERAL) and two end stages (COLLECT and CONSOLE). The definition of a<br />

new stage separator is necessary to avoid confusion with the stages of the outer<br />

pipeline, but has no effect on the stage specifications read from the member.<br />

The new pipeline is shown below.<br />

PIPE (NAME OUTPIPE) < DSICLD.LGPIPE<br />

| COLLECT<br />

| NETVIEW PIPE (STAGESEP % NAME INPIPE) LITERAL /SOME INPUT/<br />

% INTERPRT *<br />

% COLLECT<br />

% CONSOLE<br />

| LOGTO HCYLOG<br />

PIPE INTERPRT<br />

Chapter 2. Pipeline Stages and Syntax 145

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

Saved successfully!

Ooh no, something went wrong!