PIPE BETWEEN

Syntax

BETWEEN
Read syntax diagramSkip visual syntax diagram BETWEEN  INCL INCLFRST INCLLAST NOINCL  pos.len NOT /1st string/ number pos.len NOT /2nd string/

Command Description

The BETWEEN stage is a selection stage that divides a message stream into sections. The selected sections begin with a message containing a specified string and end with either a specified string or a number of messages.

The selected sections are passed to the primary output stream. The sections that were not selected are passed to the secondary output stream.

Streams

Stream Type Number Supported
Input 1
Output 2

Termination Conditions

BETWEEN terminates when the input stream or both output streams disconnect.

Operand Descriptions

INCL
Specifies that the message or messages that match the first string and, if specified, the second string is included in the output. A message that matches a count as a second condition is always included.
INCLFRST
Specifies that the message or messages that match the first string is included in the output. The second string, if specified, does not have its matching message included in the output. A message that matches a count as a second condition is always included.
INCLLAST
Specifies that the message or messages that match the second string is included in the output. The first string does not have its matching message included in the output. A message that matches a count as a second condition is always included.
NOINCL
Specifies that the message or messages that match the first string and, if specified, the second string is not included in the primary output.
number
Specifies a message count to be included in the selected section.
pos.len
Specifies the character position and length within each message where searching begins. When you specify a wild card (*) for len, the remainder of each line is searched. When you do not specify pos.len, each entire line is searched. You can specify the letter S for the length if the specification is followed by a delimited string. The BETWEEN stage replaces the letter with the length of that delimited string.
/1st string/
A delimited string that specifies the string to be found that begins a selected section. This parameter is required and can be used with /2nd string/ or number.
NOT
Indicates that a break occurs if the specified string is not found.
/2nd string/
A delimited string that specifies the string to be found that ends a selected section.

Usage Notes

The BETWEEN stage examines only the first line of multiline messages. Specifying the SEPARATE stage before BETWEEN causes all lines to be examined.

Example: Dividing Messages

The following divides a message stream into groups, as shown in the sample output:
PIPE < CNMPNL1.CNM63
     | BETWEEN 1.5/:XMP./1.6/:EXMP./
     | CONSOLE


:XMP.
 CNM630I NETVIEW SUBSYSTEM INTERFACE IS NOT INITIALIZED
:EXMP.
:XMP.
 CNM631I NETVIEW PROGRAM TO PROGRAM INTERFACE IS ACTIVE ON xxxx
:EXMP.
:XMP.
 CNM632I NETVIEW PROGRAMTO PROGRAM INTERFACE IS BEING TERMINATED
:EXMP.