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 CHANGE<br />

Syntax<br />

Synonyms<br />

CHANGE (with specifications as arguments):<br />

CHANGE<br />

1.*<br />

position.length<br />

/string1/string2/<br />

/string1/ /string2/ numchg<br />

CHANGE (with parameters from secondary input):<br />

CHANGE<br />

numchg<br />

Stage Name Synonym<br />

CHANGE CHAN<br />

Command Description<br />

The CHANGE stage replaces occurrences of the first specified string with the<br />

second string. Either string can be null. If the first string is null, the second string<br />

is inserted at the beginning of each line. If the second string is null, all occurrences<br />

of the first one are deleted. Data between substitutions are copied without change.<br />

If a secondary output stream is defined, then messages in which a change was<br />

made are passed to the primary output stream and messages in which no changes<br />

were made (because the first string is not found) are passed to the secondary<br />

output stream. If either output stream is defined, but disconnected, messages<br />

usually sent to the disconnected output stream are discarded. If no secondary<br />

output stream is defined, then all changed and unchanged messages are passed to<br />

the primary output stream.<br />

You can also specify a secondary input stream to the CHANGE stage (see the<br />

syntax diagram above labeled CHANGE (with parameters from secondary input)).<br />

Because this method provides an alternate means of providing parameters <strong>for</strong><br />

input (rather than through the use of arguments), using secondary input is<br />

particularly useful when there is a need to make many changes, or a number of<br />

changes that are computed (rather than predetermined). This also provides a<br />

means of specifying strings longer than 255.<br />

Consider a pipe that might be coded like this:<br />

PIPE (END %) <br />

| A: CHANGE<br />

| CONSOLE<br />

% STEM changeSpecs.<br />

|A:<br />

PIPE CHANGE<br />

Chapter 2. Pipeline Stages and Syntax 33

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

Saved successfully!

Ooh no, something went wrong!