Find Text from start of record

Filter:

FIND

Syntax:

FIND text

Operands:

text :: string | null
string :: character_string
character_string :: Upper or Lower Case characters, including Spaces

Functional Description:

Use the FIND stage to select records that begin with a specified text. FIND reads records from its primary input stream and writes the records that begin with the specified text to its primary output stream, if it is connected. If its secondary output stream is connected, FIND writes all other records to its secondary output stream.

text is any text that you want to find, beginning in the first column of an input record. Each character in text must exactly match the corresponding character in the input record, with three exceptions:

1. A null string (FIND with no operand specified) matches any record

2. A blank character in text is considered to match any character in the corresponding position in the input record (including a blank).

3. An underscore character (_) in text matches only a blank character in the input record. It does not match an underscore character in the input record.

Uppercase and lowercase representations of the same alphabetic character do not match. To be selected, an input record must be at least as long as text, including any trailing blanks specified in text.

If you do not specify text, FIND copies all records in its primary input stream to its primary output stream.

Use only one blank to separate the FIND stage from its operand. The operand starts after the blank and continues until the next stage separator, the next endchar character, or the end of the pipeline.

Secondary Input/Output:

OUTPUT

Synonyms:

none

Usage Notes:

The following example will find all records that contain of 'ABC' in record columns 1 through 3 of the record and write them to its primary outputstream:

| FIND ABC|

The following example will find all records that contain of 'ABC de' in record columns 1 through 6 without regard for column 4 of the record and write them to its primary outputstream, non-matching records will be written to the secondary outputstream.

|a: FIND ABC de| ... ? a:| ...

The following example will find all records that contain of 'ABC de' in record columns 1 through 6 (with a SPACE in column 4) of the record and write them to its primary outputstream, non-matching records will be written to the secondary outputstream.

|a: FIND ABC_de| ... ? a:| ...



JAVA Pipelines

Cullen Programming logo