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 < (From Disk)<br />

Return Codes<br />

The following return codes are returned to the secondary output stream if one is<br />

connected, as signed 10-digit decimal numbers:<br />

Examples<br />

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

Return Code Meaning<br />

0 Successful completion.<br />

12 Authorization problem.<br />

32 DSIDKS macro failed trying to CONNECT or FIND.<br />

40 Incorrect INCLUDE operation (%INCLUDE record normally<br />

returned unchanged to primary output stream).<br />

Other See the return codes documented <strong>for</strong> the DSIDKS assembler macro.<br />

See <strong>IBM</strong> <strong>Tivoli</strong> <strong>NetView</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Programming</strong>: Assembler <strong>for</strong> more<br />

in<strong>for</strong>mation about DSIDKS return codes.<br />

Example: Reading the Contents of a File into a Pipeline<br />

To display the contents of the CNMCMD file as a multiline message:<br />

PIPE < CNMCMD<br />

| COLLECT<br />

| CONSOLE<br />

This example reads lines of the CNMCMD member into the pipeline. The COLLECT<br />

stage builds these lines into a multiline message. When all lines are read from<br />

CNMCMD and collected, the CONSOLE stage displays the multiline message to<br />

the console.<br />

Example: Counting Comment Lines in a File<br />

Analyze the lines of the CNMSTYLE member.<br />

/* REXX sample command list */<br />

’PIPE < DSIPARM.CNMSTYLE INCL’,<br />

’| STEM A.’,<br />

’| LOCATE 1.1 /*/’,<br />

’| STEM B.’<br />

Say ’There are ’A.0’ lines in CNMSTYLE’<br />

Say ’of which ’B.0’ are comment lines.’<br />

This example reads the lines of the CNMSTYLE member under the DSIPARM<br />

ddname. The contents of the expanded member are saved in a stem variable<br />

named A. and the comment lines are located and saved to a stem variable named<br />

B.. The messages indicate how many lines were read from the CNMSTYLE<br />

expanded member and how many of those lines are comment lines.

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

Saved successfully!

Ooh no, something went wrong!