CHOP stage v1.1 |
Pipelines v2.1 |
Syntax |
┌─80─────┐
>>──CHOP──┬─┼────────┼──────────────────────────────────────────────────────┬────────><
│ └─column─┘ │
│ ┌─BEFORE─┐ │
└─┬──────┬──┼────────┼──┬─────┬──┬─────────┬──┬─charrange───────┬─┘
└─disp─┘ └─AFTER──┘ └─NOT─┘ └─ANYCase─┘ ├─STRing─┬─string─┘
└─ANYof──┘
Purpose |
Use the
CHOP stage to truncate records selectively. CHOP reads records from its primary
input stream, truncates them at the column specified and writes the truncated
records to its primary output stream. If its secondary output stream is
connected, CHOP writes the truncated portion of each record to its secondary
output stream. By default; if you do not specify an operand CHOP truncates
records after column 80.
Records
are truncated relative to occurrences of a specified target. The target can be
a range of characters, a character string or a list of characters. You can
specify that the records be truncated before or after the specified target.
Operands |
Streams |
The following streams are
used by the CHOP stage:
|
Usage |
1. |
CHOP does not
delay the records. |
2. |
If the CHOP
stage discovers that all of its output streams are not connected, the CHOP
stage ends. |
3. |
If the column
position at which to truncate is positioned before the first column of an
input record, CHOP writes a null record to its primary output stream. If its
secondary output stream is connected, the unmodified input record is written
to the secondary output stream, otherwise the input record is discarded. |
4. |
CHOP verifies
that its secondary input stream is not connected and then begins execution. |
Examples |
1. |
|
2. |
|
3. |
|
4. |
Related |
JOIN, PAD, SPLIT, STRIP, SPECS
History |
Version |
Date |
Action |
Description |
Pipelines |
1.1 |
23.12.2021 |
changed |
Application-wide rewrite. |
|
1.0 |
06.09.2007 |
created |
First version. |
|