PIPE NOT
Syntax
Command Description
The NOT stage changes the
way output is passed to the primary and secondary output streams for
those stages that pass part of their output to the primary output
stream and part of their output to the secondary output stream. Such
stages are called selection stages
and examples are CHOP, TAKE,
TOSTRING, and LOCATE. NOT causes the specified stage to execute as
usual, except that input usually passed to the secondary output stream
is passed to the primary output stream and the input usually passed
to the primary output stream is passed to the secondary output stream.
For example, specifying NOT TOSTRING ⁄ABC⁄ passes all input up to,
and including, the first message containing ABC to the secondary output
stream, and passes all subsequent input to the primary output stream.
Termination Conditions
The NOT stage modifies the stage specified in stage_specification. Because it is a modifier stage, NOT does not have its own termination conditions. See the information on the stage NOT is modifying for termination conditions.
Operand Descriptions
- stage_specification
- The stage specification being modified, including its operands.
Usage Notes
- The NOT stage does not invert the function of the specified stage. NOT SEPARATE does not become COLLECT. NOT SEPARATE discards all input, because SEPARATE keeps all input.
- The STRIP stage is not considered a selection stage. NOT STRIP discards all input.
- The stage NOT CHOP chop-operands keeps the part of each line that CHOP usually passes to the secondary output stream, if connected.
- Be careful in considering the inversion of output for stage options. For example, when the NOINCL (no include) option is used with TOSTRING, the TOSTRING stage passes the message containing the matching string to the secondary output stream. If NOT is used with TOSTRING NOINCL, the matching message is passed to the primary output stream.
- NOT is only supported for stages with two output streams.
Example: Passing Messages After One Containing a Certain String
PIPE < DSIOPEN.CNMNEWS
| NOT TOSTR NOINCL /============/
| CONSOLE
---> ====================================
---> News for 8 April, 1998
--->
---> Our new product is up and running!
. . .Example: Deleting Characters at Each Beginning Message Line
PIPE NETVIEW LIST ''
| NOT CHOP 5
| CONSOLE