Buffering records

Filter:

BUFFER

Syntax:

BUFFER [n] [expression]

Operands:

n :: integer > 1
expression :: string | hexstring
string :: delimiter character_string delimiter
hexstring :: X||*hex_number | H||*hex_number
delimiter :: any character not used in the string

Functional Description:

Use the BUFFER stage without operands to accumulate all the records (including null records) from its primary input stream, not passing any of the records until end of file is reached on the primary input stream. When BUFFER reaches end of file on its input stream, it writes all the records to its primary output stream, if it is connected.

Use the BUFFER stage with an operand to accumulate input records until a null record is read or end of file is reached. BUFFER writes this set of input records the specified number of times. If you specify a number greater than one, a null record or a record containing the specified string is written between the copies of the set of input records. Then BUFFER copies the null input record or the specified string to its primary output stream. This process continues until BUFFER reaches end of file on its primary input stream and all sets of input records are written to its primary output stream.

n
is the number of copies of the set of input records that are written to the primary output stream. If you do not specify n, one copy of the set of input records is written to the primary output stream. If you specify n without specifying string, hexstring, or binstring, BUFFER writes a null record between copies of the set of input records.

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.

Secondary Input/Output:

none

Synonyms:

none

Usage Notes:

The following example will buffer 1 set of all records.

| BUFFER |

The following example will buffer 5 sets of all records with an intervening NULL record.

| BUFFER 5 |

The following example will buffer 2 sets of all records with an intervening "ABCD123" record.

| BUFFER 5 /ABCD123/ |



JAVA Pipelines

Cullen Programming logo