RULES

Synopsis

HELP:   Input reading hints: encoding, delimiters, schema seeds (all optional)
TYPE:   OBJECT
SYNTAX: RULES(CCSID='str'/DEFAULT/ASCII/EBCDIC/BOMUTF/BOMUCS/SYSTEM/LOCAL,RECDLM='bin'/CR-ASCII/LF-ASCII/NL-ASCII/CRLF-ASCII/CR-EBCDIC/LF-EBCDIC/NL-EBCDIC/CRLF-EBCDIC/CR-UTF08/LF-UTF08/NL-UTF08/CRLF-UTF08/CR-UTF16BE/LF-UTF16BE/NL-UTF16BE/CRLF-UTF16BE/CR-UTF16LE/LF-UTF16LE/NL-UTF16LE/CRLF-UTF16LE/CR-UTF32BE/LF-UTF32BE/NL-UTF32BE/CRLF-UTF32BE/CR-UTF32LE/LF-UTF32LE/NL-UTF32LE/CRLF-UTF32LE,RECLEN=num,SEPCHR[num/COMMA/COLON/SEMICOLON/TABULATOR/BLANK...],FLDCHR[num/QUOTATION/APOSTROPHE/GRAVEACCENT/PARENTHESES/RBRACKETS/SBRACKETS/BRACES/CBRACKETS/ABRACKETS...],HEADLN,NULLST='str',SKIPROWS=num,USRTAB='str'/NPAS/SEPA/DELA/DLAX,IGNRST)

Description

Provides optional hints to guide the input CSV reading pipeline. All parameters are optional; omitting a parameter enables auto-detection for that aspect. Only supply hints when auto-detection is unreliable or needs to be locked to a specific value.

Character encoding

CCSID specifies the input character set for CNV.CHR transcoding. Provide a standard CCSID name or alias (e.g. IBM-1141, ISO-8859-1, UTF-8). When omitted, the encoding is detected automatically or taken from the system locale.

USRTAB provides a custom character mapping table for CNV.CHR. Specify a path to a user-defined mapping file. When omitted, the standard CCSID conversion is used.

Record framing

RECDLM overrides the record delimiter byte sequence used by CNV.REC. Specify a named delimiter (CRLF, LF, CR, TXT, BIN) or a hex byte sequence. When omitted, the delimiter is detected automatically.

RECLEN sets the maximum record length for CNV.REC. Records longer than this value are split. The default is 32768.

Field structure

SEPCHR specifies one or more candidate field separator Unicode codepoints as input hints for DETCSV. Up to eight values can be provided. Named values: COMMA, SEMICOLON, COLON, TABULATOR, BLANK. A custom codepoint may be supplied as a decimal or hex number. When omitted, the separator is detected automatically.

FLDCHR specifies one or more candidate field enclosing character Unicode codepoints as hints for DETCSV. Named values: QUOTATION, APOSTROPHE, GRAVEACCENT, RBRACKETS, SBRACKETS, CBRACKETS, ABRACKETS. When omitted, the enclosing character is detected automatically.

HEADLN is a switch that seeds DETCSV with the expectation that the first data row is a header row. When set, DETCSV is biased toward treating the first row as a header. When omitted, DETCSV decides on its own.

Row filtering

NULLST is a comma-separated list of string values to treat as empty (null) fields. For example: NULLST='N/A,NULL,-' makes these three values map to empty output fields. When omitted, the system defaults apply: NULL, null, NA, NaN, N/A, n/a, None, none and empty fields are treated as null. Prefix '+' to extend the defaults rather than replace them, for example NULLST='+TBD,-' adds TBD and - to the default list.

SKIPROWS=N causes the first N rows to be skipped via CNV.CMT without any pattern matching. Use SKIPROWS together with COMMENT to strip both fixed-header and pattern-matched comment rows. Default is 0.

IGNRST=ON (default) causes fields beyond the detected schema width to be ignored per row. IGNRST=OFF causes such rows to produce an error.

Arguments