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.

TO/NOT<br />

Removes blanks or other specified characters that are not blank (or not<br />

specified). TO and NOT have exactly the same function.<br />

TRAILING<br />

Removes blanks or other specified characters from only the end of the text in<br />

the message lines.<br />

Usage Notes<br />

Examples<br />

v STRIP cannot be the first stage.<br />

v A delimited character set is not recognized as a sequence of characters. Each<br />

character is considered individually. If you specified the delimited set /CAT/<br />

with TRAILING, any message ending with an A, C, T, or any combination of<br />

those characters is considered a match.<br />

Attention: Be cautious when using NOT to strip non-null characters from a<br />

message. If you omit nn to limit the strip action, the entire message might be<br />

stripped.<br />

Example: Stripping Leading Characters<br />

For this example, you have established a file member named AFILE in which<br />

records begin either with the characters 'A' or 'T' as shown:<br />

A<br />

TAME<br />

ARTFUL<br />

AARDVARK<br />

ATE<br />

THE<br />

APPLE<br />

To read the records into a pipeline, strip leading characters 'A', 'T', 'AT', or 'TA',<br />

and write the results to the console, enter:<br />

PIPE < AFILE<br />

| STRIP LEADING /TA/<br />

| CONSOLE<br />

Response<br />

(blank)<br />

ME<br />

RTFUL<br />

RDVARK<br />

E<br />

HE<br />

PPLE<br />

Example: Stripping Sequence Numbers from the End of a<br />

Message<br />

For this example, you have established a file member named THISFILE. The<br />

records are 80 bytes long and end in eight character sequence numbers.<br />

PIPE STRIP<br />

To read the records into a pipeline, strip any character that is not null <strong>for</strong> eight<br />

characters from the end of the record, write the resulting messages to a stem<br />

variable named 'OUTLINE.', and process in a command list as shown.<br />

Chapter 2. Pipeline Stages and Syntax 231

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

Saved successfully!

Ooh no, something went wrong!