× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rob & Lim,

I just got this.

Message ID . . . . . . : CPF5009
Date sent . . . . . . : 01/24/08 Time sent . . . . . . : 15:23:25

Message . . . . : Duplicate record key in member LIM.

Cause . . . . . : The output or update operation to member number 1 record
number 1 format LIMFMT, for member LIM file LIM in library CBLIB, failed.
Member number 1 record number 6 format LIMFMT has the same record key as
member number 1 record number 1 format LIMFMT. If the record number is
zero, the duplicate record key occurred on an output operation.
Recovery . . . : Change either record key so that the keys are unique.
Then try your request again.

I have the following.

0000.01 A UNIQUE 080124
0001.00 A R LIMFMT 080124
0002.00 A CODE 10 080124
0003.00 A K CODE 080124

and..

0001.00 Flim o e k disk
0002.00 /Free
0003.00 code='LIM';
0004.00 write limfmt;
0005.00 *inlr=*on;
0006.00 /End-Free

I started with the file having REUSEDLT(*NO). I ran the program a couple of times, and got the 0 record number. I then changed it to REUSEDLT(*YES) and go the above message.

So, I started again.

I added a record with LIM as the Key. I then added two more records with ABC & FRED as the keys. I then deleted the ABC record (the second record in the file).

I got this error message.

Message ID . . . . . . : CPF5009
Date sent . . . . . . : 01/24/08 Time sent . . . . . . : 15:26:49

Message . . . . : Duplicate record key in member LIM.

Cause . . . . . : The output or update operation to member number 1 record
number 2 format LIMFMT, for member LIM file LIM in library CBLIB, failed.
Member number 1 record number 3 format LIMFMT has the same record key as
member number 1 record number 2 format LIMFMT. If the record number is
zero, the duplicate record key occurred on an output operation.
Recovery . . . : Change either record key so that the keys are unique.
Then try your request again.

So, it is REUSEDLT(*YES). It's trying to reuse the record, set the keys, and then unflag the delete byte. By this point in time it knows the RRN of the record that was deleted.

At least that's all I can surmise from what I have seen in the runs I just made.

Crispin.



----- Original Message ----- From: <rob@xxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, January 24, 2008 3:21 PM
Subject: RE: CPF5009 - Duplicate record key in member


Ok. I'll try the REUSEDLT
DROP TABLE ROB.LIM

CREATE TABLE ROB.LIM (MYKEY CHAR ( 1) NOT NULL WITH DEFAULT,
PRIMARY KEY (MYKEY)) RCDFMT LIMR
Table LIM created in ROB.

DSPFD ROB/LIM
Reuse deleted records . . . . . . . . . . . : REUSEDLT *YES

INSERT INTO ROB.LIM VALUES('A')
1 rows inserted in LIM in ROB.

delete from rob.lim
1 rows deleted from LIM in ROB.

DSPFD ROB/LIM
Total deleted records . . . . . . . . . . : 1

call limrpgle
Message ID . . . . . . : CPF5009 Severity . . . . . . . : 10
Message type . . . . . : Diagnostic
Date sent . . . . . . : 01/24/08 Time sent . . . . . . : 15:18:06


Message . . . . : Duplicate record key in member LIM.
Cause . . . . . : The output or update operation to member number 1
record
number 0 format LIMR, for member LIM file LIM in library ROB, failed.
Member
number 1 record number 1 format LIMR has the same record key as member

number 1 record number 0 format LIMR. If the record number is zero, the

duplicate record key occurred on an output operation.
Recovery . . . : Change either record key so that the keys are unique.

Then try your request again.

D for dump
Statement Number . . . . . . . . . . . : 00000007
5 MyKey='A';
6 write limr;
7 write limr;
8 *inlr=*on;
9 return;
10 /end-free

Therefore it is NOT the reuse deleted records.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/24/2008 03:01 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: CPF5009 - Duplicate record key in member






Yes. It is a WRITE statement. I think it is related to file has
"REUSEDLT" of *yes. I just want to make sure my assumption is correct.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob P. Roche
Sent: Thursday, January 24, 2008 1:56 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: CPF5009 - Duplicate record key in member

I've seen the message he's referring to. The text of the message says if
the record number is 0, this occurred during a write. Basically if
record 0 duplicates with record 90020 then it never gets a record
number. Are you sure you are doing a write and not an update to the
file?



Alan Shore <AlanShore@xxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/24/2008 01:53 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: CPF5009 - Duplicate record key in member







Okay Lim
why are you EXPECTING the text to say "record number 0"?



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill



"Lim Hock-Chai"
<Lim.Hock-Chai@us
amobility.com>
To

Sent by: "RPG programming on the AS400 /
rpg400-l-bounces@ iSeries" <rpg400-l@xxxxxxxxxxxx>
midrange.com
cc



Subject

01/24/2008 02:51 RE: CPF5009 - Duplicate record
key
PM in member


Please respond to
RPG programming
on the AS400 /
iSeries
<rpg400-l@midrang
e.com>






I don't think I explain my question correctly.

It is correct that the system is given me a duplicate key error. I'm
not questioning the system giving such an error. I'm question about the
CPF message TEXT. In the TEXT it said:
"The output or update operation to member number 1 record number 1377
format ORDETR, for member ORDET file ORDET in library APLUS2FMC,
failed."

For a WRITE statement I do not except it to tell me the record number
1377. The TEXT should be
"The output or update operation to member number 1 record number 0
format ORDETR, for member ORDET file ORDET in library APLUS2FMC,
failed."

Clear as mud?

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Thursday, January 24, 2008 1:40 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: CPF5009 - Duplicate record key in member

Good point. Like I said earlier.
However, the deleted record is still ignored. It's not a factor.
I'm not really sure why this would be occuring.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/24/2008 02:22 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: CPF5009 - Duplicate record key in member







I'm not questioning the duplicate key error exist. I'm questioning why
the CPF message is showing a non zero record number. Record number in
the message should be 0 if the RPG program is executing the WRITE
opcode.





-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Francis Lapeyre
Sent: Thursday, January 24, 2008 1:19 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: CPF5009 - Duplicate record key in member

*REUSEDLT= *YES* should have no bearing on whether a duplicate key
exists or not.

The deleted record will be reused, regardless of what the key for it
was.
On Jan 24, 2008 1:13 PM, Lim Hock-Chai <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
wrote:

The statement that is getting the error is a WRITE statement. Again,
this file has REUSEDLT= *YES. I wonder that is why it is showing the
record number even thought it is a WRITE statement.




-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Thursday, January 24, 2008 12:40 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: CPF5009 - Duplicate record key in member

Glenn,
I thought the same thing also, until reading the second level help
again.
It says if the record number was zero then it occurred on a write.

Did an update try to change the key?

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Glenn Gundermann" <ggundermann@xxxxxx> Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
01/24/2008 12:56 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc

Subject
Re: CPF5009 - Duplicate record key in member






Hi Lim,

It looks like your program is writing the same key twice. If you do a

dump on the error message and compare the values with the 1st record
listed in the error message, you should be able to determine what it
is writing. Then take a look at the program and try to figure out
why.

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295

> One of our production program is getting a CPF5009 error. This is a
RPG
> program and the statement that is causing the error is a WRITE
> statement. I'm not understanding why this CPF is showing a non zero

> record number for a write operation. The file does have "REUSEDLT"
> of *yes. Could this be the cause?
>
> thanks
>
>
>
> Additional Message Information
>
>
>
> Message ID . . . . . . : CPF5009 Severity . . . . . . . :
10
>
> Message type . . . . . : Diagnostic
>
> Date sent . . . . . . : 01/24/08 Time sent . . . . . . :
> 09:53:49
>
>
> Message . . . . : Duplicate record key in member ORDET.
>
> Cause . . . . . : The output or update operation to member number
1
> record
> number 1377 format ORDETR, for member ORDET file ORDET in library

> APLUS2FMC,
> failed. Member number 1 record number 1376 format ORDETR has the
same
> record
> key as member number 1 record number 1377 format ORDETR. If the
> record
> number is zero, the duplicate record key occurred on an output
> operation.
> Recovery . . . : Change either record key so that the keys are
> unique.
> Then try your request again.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.




--
Francis Lapeyre

Da mihi sis crustum Etruscum cum omnibus in eo.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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-2024 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.