Joel,

Thanks for the suggestion about removing the UNIQUE statement.  I did that and changed the program by adding the WITH DUPLICATES stmt and ran it again and lo and behold there is a duplicate at the end of the file.  Now I have to find out how that is happening.  In my program, I'm just doing a read- write-read-write so this will be a hassle, but at least I now know where to look.

Rich
-------------------------

Quoting "Stone, Joel" <Joel.Stone@xxxxxxxxxx>:

Are you using "SECTIONS" in the code?  Sometimes it can run thru  statements an extra time before ending.

Also, try removing the "UNIQUE" from the file and running the CBLLE  pgm, and see if the last record is a dup.

-----Original Message-----
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf  Of Rich Loeber
Sent: Wednesday, June 25, 2014 2:27 PM
To: COBOL Programming on the iSeries/AS400
Subject: [COBOL400-L] CPF5009/5026?

    I have a CBLLE program that is creating a file with a 5 part unique key.
    In the program, I have the file set as:

            organization is indexed
            access is random
            record key is externally-described-key.

    The file is cleared before starting and is opened as an output file.
    There is a single write statement to the file with a check for a duplicate
    key.  I have absolutely confirmed that there is no way that a record with
    a duplicate key is getting generated, but after writing the last record to
    the file, it is leaving a CPF5009/CPF5026 in the joblog.  The job goes on
    to the next step and produces the right output, but I'm trying to get it
    to stop issuing the error codes.  The file is set to reuse deleted
    records, but I've tried it by removing that setting and it still throws
    the error codes.

    Any ideas?

    I'm running IBM's 6.1 version of the OS and am current on PTFs.

    Rich Loeber - @richloeber
    Kisco Information Systems
    [1]http://www.kisco.com

References

    Visible links
    1. http://www.kisco.com/
--
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.


________________________________________________________________________
This inbound email has been scanned for all viruses by the  MessageLabs SkyScan
service.
________________________________________________________________________

______________________________________________________________________
This outbound email has been scanned for all viruses by the  MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.