Between

Filter:

BETWEEN

Syntax:

BETWEEN expression1 expression2

Operands:

expression1 :: string | hexstring
expression2 :: string | hexstring | number
string :: delimiter character_string delimiter
hexstring :: *hex_number||x | *hex_number||h
delimiter :: any character not used in the locate string
number :: integer > 1

Functional Description:

Use the BETWEEN stage to select groups of records from its primary input stream, starting with the first record that begins with a specified target string. BETWEEN writes a group or records to its primary output stream, if connected, ending a group with the record that has the second specified string or with all remaining records once the specified number of records that won't be selected is reached. Each specified target string must begin in the first column of an input record.

If the secondary output stream is connected, BETWEEN writes the records that are not selected to its secondary output stream. If the secondary output stream is not connected, BETWEEN discards these records.

Uppercase and lowercase representations of the same characters do not match. A match is found only if the data in the input records exactly matches the target strings you specify, including blank characters. Blank characters contained in the input stream must match the blank characters in the target strings.

Hhexstring and Xhexstring:
defines a target string of hexadecimal characters, following the X or H, that defines a target string of characters to be located. The X or H can be specified in uppercase or lowercase. You must not specify any spaces in the string. There must be an even number of hexadecimal characters in the string.

n
specifies the number of records to be written to the primary output stream, starting with and including the record that begins with the starting target string1. BETWEEN writes n records each time the starting target string is found in the first column of an input record. n cannot be less than 2. If the number of records remaining in the input stream is less than n, the remaining records are written to the primary output stream.

Secondary Input/Output:

OUTPUT

Synonyms:

ALL

Usage Notes:

The following example will select all records with ABC in columns 1-3 up through the first record that has XYZ in columns 1-3

BETWEEN /ABC/ /XYZ/

The following example will select a group of records beginning with the first occurence of a record that has ABCD in columns 1-4, for the next 10 records, then will begin scanning for ABCD again. BETWEEN /ABCD/ 10

The following example will select all records with ABC in columns 1-3 up through the first record that has XYZd in columns 1-4 and write all non-matched records to the secondary output.

a: BETWEEN /ABC/ /XYZd/


JAVA Pipelines

Cullen Programming logo