PATTERN

Synopsis

HELP:   Decimal digit layout (e.g. YYYYMMDD) [AUTO-DETECT]
TYPE:   STRING
SYNTAX: PATTERN='str'

Description

Decimal digit layout pattern for FORMAT.DEC (COBOL COMP/COMP-5).

FORMAT.DEC stores the date as a binary integer whose decimal value represents the date digits (e.g. the integer 20260428 = 2026-04-28). PATTERN describes the digit order in that decimal value.

SUPPORTED TOKENS (subset of the full FORMAT.STR token set)

YYYY 4-digit year YY 2-digit year (PIVOT applies) MM month 01-12 DD day of month 01-31 DDD Julian day-of-year 001-366 HH hour 00-23 MI minute 00-59 SS second 00-59

RESTRICTIONS

Literal separator characters (- / : . T Z space) are NOT supported because the field is a pure integer -- separators cannot appear in a binary integer value. Only compact all-digit patterns are valid (e.g. YYYYMMDD, YYYYMMDDHHMISS).

Partial-date patterns (YYYY, YYYYMM) are supported. Millisecond/microsecond tokens (sss, ssssss) are NOT supported.

DEFAULTS

Read: [AUTO-DETECT] -- digit count of the decimal integer value determines the pattern (8 digits -> YYYYMMDD, 14 -> YYYYMMDDHHMISS). Write: [Auto-derived from canonical ISO-8601 input digits].