Supported RPG Features

The DATEDIT keyword on CTL-OPT (or H-spec) fixes, at compile time, the digit ordering of the job-date reserved words UDATE (6-digit) and *DATE (8-digit, 4-digit year). It accepts *MDY, *DMY, or *YMD, each with an optional trailing separator character (e.g. *YMD/); the separator affects only the Y edit-code image and is otherwise ignored for the reserved words. The default (when DATEDIT is omitted) is *MDY.

DATEDIT UDATE (6-digit) *DATE (8-digit)
*MDY (default) mmddyy mmddccyy
*DMY ddmmyy ddmmccyy
*YMD yymmdd ccyymmdd

The ordering is set from the source's DATEDIT and does not follow the runtime job date format (CHGJOB DATFMT) or the DATFMT keyword. *JUL is not a valid DATEDIT value - there is no Julian UDATE - and is rejected with TRN1018.

UDATE and *DATE (and the related UMONTH/*MONTH, UYEAR/*YEAR, UDAY/*DAY) are available as output fields on fixed-format O-specs. Fixed-format example (with a job date of 12/25/2026, *YMD prints 261225 and 20261225):

     H DATEDIT(*YMD)
     FQSYSPRT   O    F  132        PRINTER
     C                   EXCEPT    DTL
     C                   SETON                                        LR
     OQSYSPRT   E            DTL
     O                       UDATE                6
     O                       *DATE               16