From the compile listing:
COPY DDSR-JE027006 OF EVENTS.
I-O FORMAT:JE027006 FROM FILE JE027006 OF LIBR
Case party action.Fetch by Case-BegDt-BegTm
THE KEY DEFINITIONS FOR RECORD FORMAT JE027006
NUMBER NAME RETRIEVAL ALTSEQ
0001 CT1FYA ASCENDING YES
0002 JEBOA ASCENDING YES
0003 BEGIN-DATE DESCENDING NO
0004 JELLA DESCENDING NO
06 JEBOA PIC X(20).
06 CT1FYA PIC X(5).
06 CP-SEQ-NBR PIC S9(7) COMP-3.
06 CPA-SEQNBR PIC S9(7) COMP-3.
06 JE9AA PIC S9(7) COMP-3.
06 JEPVA PIC X(1).
06 BEGIN-DATE FORMAT DATE "@Y-%m-%d".
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Sent: Friday, November 29, 2013 12:47 PM
Subject: Re: [COBOL400-L] *ISO date in COBOL?
Check the compile listing to see if the field is being specified as FORMAT
DATE '@Y-%m-%d'. There could also be an entry under special names which
could throw things off. If the format isn't specified with '@Y-%m-%d', the
compiler will treat the dates using the job default--and you cannot set
DATFMT for a job to *ISO (or *USA for that matter).
You may know this, but internally the dates are not stored in a format we
humans would recognize. They are stored as a 10-digit integer. The system
takes care of converting to whatever format is requested at the time. If
you don't specify one, It will default the the job format. At our shop
that's *MDY--perhaps yours is *YMD. In any case, none of the default job
date formats include the 1st of January 0001. Hence, dates as early as that
will cause a data format mapping error.
If the compile listing shows the year portion of the date as something other
than '%y' (lower-case y), then you've got a different problem. an
upper-case Y with either % or @ will work.
cobol400-l-bounces@xxxxxxxxxxxx wrote on 11/28/2013 01:00:03 PM:
----- Message from "Tom Hightower" <tomh@xxxxxxxxxxx> on Wed, 27 Nov
2013 17:55:18 -0600 -----
"'COBOL Programming on the IBM i \(AS/400 and iSeries\)'" <cobol400-
Re: [COBOL400-L] *ISO date in COBOL?
The programmer working on it says that she's doing the compile like so:
CRTBNDCBL PGM(IDOCKETGY/CCEXTRACT) +
SRCFILE(IDOCKETGY/QCBLSRC) SRCMBR(*PGM) +
OPTION(*SOURCE) CVTOPT(*DATETIME *DATE) +
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L)
mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/cobol400-l
As an Amazon Associate we earn from qualifying purchases.