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.

Examples<br />

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

conditions apply:<br />

– The variable specified on the VAR stage is initially dropped. Under REXX,<br />

this is equivalent to the REXX DROP function. Under REXX, the SYMBOL<br />

function indicates that the variable is of type LIT. In the <strong>NetView</strong> command<br />

list language and HLL, the variable is set to null and has a zero length.<br />

There<strong>for</strong>e, if VAR is not the first stage and is never called to process message<br />

buffers <strong>for</strong> a given pipeline, the value is dropped when the pipeline<br />

completes.<br />

– If the first input buffer to the VAR stage is an MLWTO, only the first message<br />

line of the MLWTO is saved to the named variable, and the entire MLWTO is<br />

sent to the output stream.<br />

Example: Writing to Named Variables<br />

To select the first five data elements from the 'DATA.' stem and save them into<br />

variables A, B, C, D, and E respectively, run the following REXX COMMAND LIST.<br />

/* REXX COMMAND LIST */<br />

’PIPE STEM DATA.’<br />

’|VARABCDE’<br />

Example: Using the STAGESEP Stage <strong>for</strong> DBCS Problems<br />

You can use the following command <strong>for</strong> character problems encountered in DBCS:<br />

DATA1 = sql statements including x’4Fxx’<br />

’PIPE (END %) LITERAL /’ DATA1’/ | ------’ ===> results: BAD<br />

’PIPE (END %) VAR DATA1 | EXCUTE ------ ’ ===> results: GOOD<br />

PIPE VAR and PIPE $VAR<br />

Chapter 2. Pipeline Stages and Syntax 253

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

Saved successfully!

Ooh no, something went wrong!