TXT

Synopsis

HELP:   Format data based on delimiters in text elements (record and rest)
TYPE:   OBJECT
SYNTAX: TXT(METHOD=BIN/TXT/DLM/REC,CHRSET=NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL,RPLFFD[=num],SUPTWS,NELDLM,PADCHR=num,RECLEN=num,BUFSIZ=num,INICNT=num,BINERR,CHRERR,REGEXP())

Description

The object "format text" splits the data into text records and rest elements based on delimiters (METHOD=TXT). The rest element contains the delimiter and optional trailing whitespace if the suppression of trailing whitespace is activated. The text record and the rest element together compose the original data.

If the data contains no delimiters but record length is available, record formatting (METHOD=REC) is used. In this case, the rest element is empty unless suppression of trailing whitespace is used. If no delimiters and no length fields are found and the BINERR switch is not set, then binary formatting (wrapping of the data into records of the defined length) is done. If the BINERR switch is set, an error is triggered if the data is binary. Delimiter, record or binary formatting can be enforced by defining the corresponding method or the data dependent automatism can be used.

If you have text in one of the ISO code pages with 0x85 (NEL) as delimiter, you can optionally enable recognition of NEL as delimiter. NEL (next line) is optional because this value is the general currency sign or the continuation symbol and not a new line in many single byte ASCII codepages.

The raw text record (without the rest element) can be validated using a regular expression. Non-matching records can be configured to be ignored or cause an error (default).

Text formatting supports a lot of powerful features which can be accessed with the parameters below.

Arguments