FROMLABEL stage v1.1

Pipelines v2.0

 

Purpose, Operands, Streams used, Usage notes, Examples, See also

Home

 

Syntax

 

                                    _STRing__
>>__ _FROMLABel_ __ ____________ __|_________|__ ________ _____________________________><
    |_FRLABel___|  |_CASEI(...)_|  |_REGexp__|  |_string_|
                   |_ZONE(...)__|  |_PATtern_|

 

Purpose

 

Use the FROMLABEL stage to select records from its primary input stream. The records selected are determined by the string you specify. The specified target string must begin in the first column of an input record. Once the record that begins with the target string is found, the record that begins with the target string and the following records are written to the primary output stream.

 

Unless the CASEI or ZONE pre-process option specifies a different column range, string must begin in the first column of an input record. If the secondary output stream is connected, FROMLABEL writes the records that are before the record that begins with the target string to its secondary output stream. If the secondary output stream is not connected, FROMLABEL discards these records.

 

Operands

 

    

CASEI

perform a non-case-sensitive comparison between the target string and the input record.

 

    

ZONE

restrict data selection to a specific column, word or field range.

 

    

STRing

specifies that the string operand is a literal string of characters to locate.

 

    

REGexp

specifies that the string operand is a regular expression of characters to locate.

 

    

PATtern

specifies that the string operand is a pattern of characters to locate.

 

    

string

is a string to locate.

 

If string is not specified, FROMLABEL writes any leading null records to its secondary output stream, if it is connected. FROMLABEL then writes all its remaining input records to its primary output stream.

 

Streams used

 

The following streams are used by the FROMLABEL stage:

 

Stream

Action

 

 

Primary input stream

FROMLABEL reads records from its primary input stream.

Primary output stream

FROMLABEL copies the first input record that begins with the specified target string and all the remaining input stream records to its primary output stream.

Secondary output stream

If its secondary output stream is connected, FROMLABEL copies all input records up to but not including the first record matching the specified target string to its secondary output stream. FROMLABEL copies the remaining records that do not match the specified target string to its primary output stream

 

Usage notes

 

     1)

FROMLABEL does not delay the records.

 

     2)

If the FROMLABEL stage discovers that all of its output streams are not connected, the FROMLABEL stage ends.

 

     3)

If you specify the ZONE pre-process function, the target string must begin in the first column of the specified column range instead of the first column of the input record. To be selected, the target string must be completely located within the column range; therefore, the length of the target string must be less than or equal to the width of the column range.

 

     4)

FROMLABEL verifies that its secondary input stream is not connected and then begins execution.

 

Examples

 

Removing a block of records

 

See also

 

Reference the following links for additional information:

 

CASEI, DROP, TAKE, TOLABEL, ZONE

 

History of change

 

Version

Action

Description

 

 

 

1.1

Added

Support for the REGEXP operand; which specifies that the string operand is interpreted as a regular expression.