Supported RPG Features

The DATEYY keyword on CTL-OPT (or H-spec) controls diagnostics for date fields using 2-digit-year formats (*MDY, *DMY, *YMD, *JUL), which only support the year range 1940-2039.

Value Meaning
DATEYY(*ALLOW) Allow 2-digit-year formats without diagnostics (default)
DATEYY(*WARN) Emit a warning for each 2-digit-year date field
DATEYY(*NOALLOW) Emit an error, preventing compilation

Four-digit-year formats (*ISO, *USA, *EUR, *JIS) and century formats (*CYMD, *CMDY, *CDMY) are not affected.

CTL-OPT DATEYY(*NOALLOW);
DCL-S GoodDate DATE(*ISO);   // OK - 4-digit year
DCL-S BadDate  DATE(*MDY);   // ERROR - 2-digit year not allowed