FORMAT

Synopsis

HELP:   External byte encoding: FORMAT.STR/BCD/DEC/INT [STR]
TYPE:   OVERLAY
SYNTAX: FORMAT.{STR(PATTERN='str',CHRSET=num/NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL)/BCD(TYPE=UNPACKED/PACKED/ZONED,PATTERN='str')/DEC(ENDIAN=SYSTEM/BIG/LITTLE/LOCAL,SIZE=num,PATTERN='str')/INT(SIZE=num,ENDIAN=SYSTEM/BIG/LITTLE/LOCAL,EPOCH=UNIX/LILIAN/J2000,UNIT=SS/MS/US/NS/DS)}

Description

Selects the external byte encoding of the date field.

FORMAT.STR ASCII or EBCDIC digit string (PIC X, CHARACTER) -- default. Digit bytes in ASCII (0x30-0x39) and all IBM EBCDIC variants (0xF0-0xF9) are recognised automatically. Separator characters in both ASCII and EBCDIC are silently skipped. An optional CCS parameter enables full ICV character-set conversion before digit extraction, covering all code pages. The optional PATTERN parameter specifies the expected byte layout (e.g. PATTERN='YYYYMMDD'); if omitted, the format is auto-detected.

FORMAT.BCD Binary coded decimal. TYPE=ZONED (default) handles PIC 9 DISPLAY fields; TYPE=PACKED handles PIC 9 COMP-3 fields. The optional PATTERN parameter specifies the digit layout.

FORMAT.DEC Unsigned binary integer (COMP, COMP-5). ENDIAN selects byte order (BIG=mainframe default, LITTLE, SYSTEM). SIZE specifies the field width in bytes (2, 4, or 8). The optional PATTERN parameter specifies the digit layout.

The internal neutral format (ISO-8601 UTF-8) is NOT affected by the FORMAT choice -- it is always determined by the component from the PATTERN tokens.