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.

Building Large PIPE Commands: INTERPRT<br />

The INTERPRT stage enables the user to build and run pipeline stages from input<br />

command data. The commands are processed by the INTERPRT stage as an inner<br />

pipeline in a PIPE-within-a-PIPE structure. In some command procedure<br />

environments, commands are limited to 240 characters. The INTERPRT stage<br />

allows pipeline specifications to exceed these limitations.<br />

Using the INTERPRT Stage<br />

Example: Building a Pipeline with INTERPRT<br />

This example shows how to use the INTERPRT stage to build a pipeline<br />

specification from stage specifications read into the pipeline through the STEM<br />

stage.<br />

The example is shown within a <strong>NetView</strong> command list, named PIPEEX10:<br />

PIPEEX10 CLIST<br />

&CONTROL ERR<br />

*<br />

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

** THIS CLIST USES THE PIPE COMMAND AND INTERPRT STAGE TO PROCESS**<br />

** A PIPELINE. **<br />

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

*<br />

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

** CREATE VARIABLES FOR EACH STAGE TO BE INTERPRETED **<br />

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

&STAGE1 = ’NETVIEW LIST KEY=ALL’<br />

&STAGE2 = ’SEPARATE’<br />

&STAGE3 = ’TAKE FIRST 10’<br />

&STAGE4 = ’COLLECT’<br />

&STAGE5 = ’CONSOLE’<br />

&STAGE0 = 5<br />

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

** **<br />

** EXECUTE PIPE COMMAND, PLACE RESULTS IN A SAFE NAMED MYKEYS **<br />

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

PIPE STEM STAGE +<br />

| COLLECT +<br />

| NETVIEW PIPE INTERPRT * +<br />

| SAFE MYKEYS +<br />

| CONSOLE<br />

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

** WRITE RETURN CODE INFORMATION TO TERMINAL AND EXIT CLIST **<br />

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

&WRITE RETURN CODE = &RETCODE<br />

&EXIT<br />

Output from PIPEEX10 follows:<br />

<strong>NetView</strong> Pipelines Device Drivers<br />

Chapter 3. <strong>NetView</strong> Pipelines Device Drivers 301

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

Saved successfully!

Ooh no, something went wrong!