Purpose, Argument, Streams, Usage, Examples, Related
>>──stage──ZONE(─┬────────────┬──┬───────┬──┬─────────┬─)──┬──────────┬──────────────>< └─inputrange─┘ └─CASEI─┘ └─REVerse─┘ └─operands─┘
Use the ZONE pre-process function to alter the input records read by the stage from any
of its input streams. The ZONE function operates on the input records before they are
presented to the stage.
There are a number of stages that permit the use of the ZONE function and these are
stages that do not perform any translation of their input records. They are purely
filter type stages that simply select input records based on some criteria.
The ZONE function instructs the manager to extract a substring of the record, determined
by the column, word or field range, and optionally; to translate both the stage operands
and the content of the input records to uppercase, and present this altered record to the
stage when a read-record is requested. The ZONE function does not alter the way in which
a stage processes its input and output records, it only alters the format of the record
which is presented to the stage. When the stage performs a subsequent write-record request,
the manager writes the original unmodified input record to the specified output stream.
**** Top of file **** Address Rxpipe
'pipe literal /aBbCc def ghi/', '| split', '| between zone( 3-* casei3-* ) x62 /b/', '| console'
Exit 0 **** End of file ****
**** Top of file **** Address Rxpipe
'pipe literal /a-B-c c-b-A/', '| split', '| fromlabel casei( zone wordsep /-/ w2 ) /b/', '| console'
Exit 0 **** End of file ****
output:
a-B-c c-b-A
**** Top of file **** Address Rxpipe
'pipe literal /ABCDE FGHIJ/', '| split', '| tolabel casei( zone -3;-2 ) /hi/', '| console'
Exit 0 **** End of file ****
output:
ABCDE
BETWEEN, CASEI, FROMLABEL, INSIDE, LOCATE, NOTLOCATE, OUTSIDE, TOLABEL, ZONE