Purpose, Argument, Streams, Usage, Examples, Related
>>──stage──CASEI(─┬─────────────────┬──┬─────────┬─)──┬──────────┬───────────────────>< └─ZONE─inputrange─┘ └─REVerse─┘ └─argument─┘
Use the CASEI pre-process function to alter the input records read by the stage from
any of its input streams. The CASEI 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 CASEI 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 CASEI function
instructs the manager to; translate both the stage operands and the content of the input
records to uppercase, and optionally, extract a substring of the record specified by the
inputrange argument and to present this altered
record to the stage when a read-record is requested. The CASEI 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 casei( zone 3-* ) 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, FROMLABEL, INSIDE, LOCATE, NOTLOCATE, OUTSIDE, TOLABEL, ZONE