(Problem fixed, but you might like to read).
I cleared the file and, as you thought, it did give the same error message
(CPF5097) and same record number.  I also initialized the BEGIN-DATE to
'9999-12-31' but that didn't get it going.
JE027006 is a logical over JE027000. In the calling CL, JE027006 is
overridden as "EVENTS".   I don't have the DDS source, so I include a print
of the File Field definitions for JE027006:
FILE: JE027006  (trimmed to just the keys)
FIELD       KEY   LEN TYPE   DEC POS 
JEBOA		K02	20	A           1 
CT1FYA		K01	5	A          21 
BEGIN_DATE	K03		L      0   39 
JELLA       	K04        		T      0   49 
File level spec:
* INPUT EVENTS FILE                                        
     SELECT EVENTS-IN ASSIGN TO DATABASE-EVENTS            
                    ORGANIZATION IS INDEXED                
                    ACCESS IS DYNAMIC                      
                    RECORD KEY IS EXTERNALLY-DESCRIBED-KEY 
                    WITH DUPLICATES.                       
.
.
.
FD  EVENTS-IN.                                       
 01  MCEVNT-RECORD.      COPY DDSR-JE027006 OF EVENTS.
.
.
.
OPEN INPUT EVENTS-IN.
.
.
.
CLOSE EVENTS-IN.   
.
.
.
GET-ALL-EVENTS.                                     
    MOVE ZEROS TO PREV-DATE.                        
    MOVE ZEROS TO HOLD-EVT-NO.                      
    MOVE SPACES TO MCEVNT-RECORD.                   
    MOVE CT1FYA OF CASES-IN TO CT1FYA OF EVENTS-IN. 
    MOVE JEBOA OF CASES-IN TO JEBOA OF EVENTS-IN.   
    MOVE ZEROS TO CP-SEQ-NBR OF EVENTS-IN.          
    MOVE ZEROS TO CPA-SEQNBR.                       
    MOVE '9999-12-31' TO BEGIN-DATE OF EVENTS-IN.       (added this per
suggestion)
    START EVENTS-IN KEY > EXTERNALLY-DESCRIBED-KEY  
        INVALID KEY                                 
            GO TO COPY-APPROPRIATE-CASES-END.       
    PERFORM GET-EVENTS THRU GET-EVENTS-END.         
.
.
.
GET-EVENTS.                          
    READ EVENTS-IN NEXT              
        AT END                       
            GO TO GET-EVENTS-END.    
.
.
.
GET-EVENTS-END.
And, after looking at ALL of this - I think I see the problem (feeding off
what has been suggested previously): I also need to initialize the JELLA
field (since it's also a key to access the file).
(pause a few minutes while I test that)
SUCCESS!
After initializing the BEGIN-DATE (date) to '9999-12-31' and JELLA (time)
field to '23.59.59' , the program compiled and ran.  Now to hand it back to
the programmer for her to continue working with it.
Thanks for all the help,
TomH
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Saturday, November 30, 2013 3:53 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: Re: [COBOL400-L] *ISO date in COBOL?
On 29-Nov-2013 17:32 -0800, Tom Hightower wrote:
Copied the data as you suggest - same error, same bogus record number 
(there are only 864774 record in the file).
   I believe the error will re-create, even with zero records; i.e. the
program run against an empty file.  Could you verify?; if the /copied/ files
and data still exist, just CLRPFM.
   I suspect the "record number 4294967295" as [the intended] special value
of negative one (-1) for unsigned 4-byte integer with value
2**32-1 indicates that the read was by key, but no position was obtained; in
this case, apparently due to the key position value being an invalid date
representation.
   And I suspect the error following the CPF5035 RC17, was msg CPF5097 "Key
mapping error" with the same information for its replacement variables; i.e.
instead of the CPF5029 that I had alluded would have "all of the same
information for its replacement variables".?
   Confirmed by your reply to Michael the value of BEGIN-DATE is blanks, and
as alluded by Michael the BEGIN-DATE variable would need to be set for a
/key-position request/ because that variable serves as the value for the key
sent to the database.  The value of all blanks is not a valid
string-representation of an ISO date, so the database balks; signaling the
msgCPF5035 RC17 with the implication that no position could be obtained
[i.e. the RRN being that 4-billion+ number].
http://archive.midrange.com/cobol400-l/201311/msg00018.html
   If so, depending on the requirements of the program, changing to use
ACCESS MODE SEQUENTIAL instead of ACCESS MODE DYNAMIC and then repeated READ
until end-of-file, or if specifying a starting key is desired then
*initialize the starting key values* [at least for its BEGIN_DATE; other
values as their data-type defaults may be appropriate.?] and then perform
repeated READ NEXT or issue READ KEY IS data-name-1.  Note: As a DESCENDING
key, the most appropriate start for BEGIN-DATE may be an effective *highval
when no specific date is required, or a partial key should be used; e.g. to
set an effective *hival:
     MOVE '9999-12-31' TO BEGIN-DATE.
   If that does not resolve the issue, then:
   Please post the DDS for the EVENTS, JE027000, and JE027006 files; at
least the BEGIN_DATE field, key fields, and both file-level and record-level
specs.  Also the full START statement and any READ statement from the CBL
program for that file.
   Could you run the request with debug active, and post the spooled joblog
to include all messages from the start of the request [e.g. CALL
IDOCKETGY/CCEXTRACT] until and including the LNR7057 diagnosing the FS90?
--
Regards, Chuck
--
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,
visit: 
http://lists.midrange.com/mailman/listinfo/cobol400-l
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.