× 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.



The answer to your predicament is
Do you want/need to allow duplicate keys?
If the answer is - duplicates can be allowed, then you will HAVE to remove the 
UNIQUE and re-compile all the programs that use this file.
However, if there can be NO duplicates, then some analysis is required to 
remove the situation of duplicates.

>>> "Anita Imbrescia" <aimbresc@CO.WESTMORELAND.PA.US> 10/03/02 01:23PM >>>
Thanks for all your replies.

Next question:  If I change the LF to eliminate the word UNIQUE, I will
need to recompile it and all the programs that use it, correct?

Is there another way?

Anita Imbrescia
Westmoreland County Courthouse
Courthouse Annex
2 North Main Street
Greensburg, PA  15601
724-830-3758
aimbresc@co.westmoreland.pa.us


-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On Behalf Of Peter Colpaert
Sent: Thursday, October 03, 2002 10:47 AM
To: rpg400-l@midrange.com
Subject: Re: Adding records to a file


Hi Anita,

what happens is that the database checks _all_ logicals that exist over
your physical.

So if you upload a record that has a duplicate key in any one of the
logicals over IMMAST (whether you use them in your RPG or not), you'll
get
the duplicate key error.

Your only option is to either not insert the record, or make IMMASTL7
non-unique.

HTH,

Peter Colpaert
Application Developer

Honda Europe NV
Langerbruggestraat 104
B-9000 GENT
Belgium
Peter.Colpaert@honda-eu.com
Tel: +32 9 2501 334
Fax: +32 9 2501 231
----------
Yoda of Borg are we: Futile is resistance. Assimilate you, we will.
----------




"Anita Imbrescia" <aimbresc@CO.WESTMORELAND.PA.US>@midrange.com on
03/10/2002 16:39:27
Please respond to rpg400-l@midrange.com
Sent by:  rpg400-l-admin@midrange.com

To:   <rpg400-l@midrange.com>

cc:

Subject:  Adding records to a file


Hi List,

I wrote a program to upload records from a workfile to populate system
files.  I created the PFs and LFs I was using in my library and it
uploaded fine.  However, when I try to upload it to the test libraries
it loads 4 records, then I get an "Attempt to write a duplicate record
to file IMMAST".  None of these records exists in the current file.  It
also points to a logical that I am not referencing in the RPG. Here is
the error from the job log:

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

 Cause . . . . . :   The output or update operation to member number 1
record  umber 139 format IMREC1, for member IMMASTL7 file IMMASTL7 in
library NWSIMTST, failed. Member number 1 record number 138 format
IMREC1 has the same record key as member number 1 record number 139
format IMREC1.  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.

0    10/03/02   10:25:17   QDBSIGEX       QSYS        016D     QDBSIGEX
QS
 Message . . . . :   Duplicate key on access path.

 Cause . . . . . :   An output or update operation on record number 139
record format IMREC1 member number 1 failed because of a duplicate key
in a unique  keyed member that is based on member IMMAST file IMMAST in
library NWSIMTST or in a based-on member of IMMAST. The failure could
also have been caused  by an output or update operation done to another
file by a trigger program associated with file IMMAST in library
NWSIMTST. Recovery  . . . :
previously listed message CPF5009 to identify the file and record with
the
duplicate key and change the key value so that it is unique. Note that
the
file could be a file operated on by a trigger program. Then try your
reques
again. Possible choices for replying to message . . . . . . . . . . . .
. .

As I said, I am not referencing IMMASTL7.  I am using L2 in the program.


Can anyone help?  Thanks in advance,

Anita Imbrescia
Westmoreland County Courthouse
Courthouse Annex
2 North Main Street
Greensburg, PA  15601
724-830-3758
aimbresc@co.westmoreland.pa.us




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






______________________________________________________________________
The information contained in this communication is confidential and may
be
legally privileged. It is intended solely for the use of the individual
or
the entity to whom it is addressed and others authorised to receive it.
If
you have received it by mistake, please let the sender know by e-mail
reply
and delete it from your system.
If you are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking any action in reliance of
the
contents of this information is strictly prohibited and may be unlawful.
Honda Europe NV is neither liable for the proper and complete
transmission
of the information contained in this communication nor for any delay in
its
receipt.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 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.