IBM Tivoli NetView for z/OS, Version 6.2

PIPE STRIP

Syntax

Read syntax diagramSkip visual syntax diagram
STRIP

          .- --BOTH-----.              .- --BLANK---------.   
|--STRIP--+-------------+--+--------+--+------------------+----->
          +- --LEADING--+  +- --TO--+  '- --⁄--charset--⁄-'   
          '- --TRAILING-'  '- --NOT-'                         

>--+--------+---------------------------------------------------|
   '- limit-'   

Command Description

The PIPE STRIP stage removes blanks or other specified characters from the beginning or end of message data. Alternately, STRIP removes all characters up to a blank or other specified characters.

You can use the STRIP stage to remove unwanted blanks or other characters before you use the JOINCONT stage.

Streams

Stream Type Number Supported
Input 1
Output 1

Termination Conditions

STRIP terminates when the input stream or the output stream is disconnected.

Operand Descriptions

BLANK
The default is to remove blanks.
BOTH
Removes blanks or other specified characters from both the beginning and the end of the text in the message lines. This is the default.
⁄charset⁄
Specifies the set of characters to be stripped. Order and duplicate characters are ignored. The delimited set must be specified.

The first nonblank character encountered after the keywords is the delimiter which establishes the boundary of the character set used by the stage. The delimited set ends when the same character is encountered a second time. // is interpreted as a null set.

LEADING
Removes blanks or other specified characters from only the beginning of the text in the message lines.
limit
The maximum number of characters to be removed by STRIP. If you use BOTH, the limit applies separately to the leading and trailing strip operation.
TO/NOT
Removes blanks or other specified characters that are not blank (or not specified). TO and NOT have exactly the same function.
TRAILING
Removes blanks or other specified characters from only the end of the text in the message lines.

Usage Notes

  • STRIP cannot be the first stage.
  • A delimited character set is not recognized as a sequence of characters. Each character is considered individually. If you specified the delimited set /CAT/ with TRAILING, any message ending with an A, C, T, or any combination of those characters is considered a match.
Attention: Be cautious when using NOT to strip non-null characters from a message. If you omit nn to limit the strip action, the entire message might be stripped.

Example: Stripping Leading Characters

For this example, you have established a file member named AFILE in which records begin either with the characters 'A' or 'T' as shown:
   A
   TAME
   ARTFUL
   AARDVARK
   ATE
   THE
   APPLE
To read the records into a pipeline, strip leading characters 'A', 'T', 'AT', or 'TA', and write the results to the console, enter:
 PIPE < AFILE
      | STRIP LEADING /TA/
      | CONSOLE
Response
   (blank)
   ME
   RTFUL
   RDVARK
   E
   HE
   PPLE

Example: Stripping Sequence Numbers from the End of a Message

For this example, you have established a file member named THISFILE. The records are 80 bytes long and end in eight character sequence numbers.

To read the records into a pipeline, strip any character that is not null for eight characters from the end of the record, write the resulting messages to a stem variable named 'OUTLINE.', and process in a command list as shown.
 /*   REXX command list   */
 'PIPE < THISFILE',
      '| STRIP TRAILING NOT // 8',
      '| STEM OUTLINE.'


Feedback