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



This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I get an error when I try to update a physical file.  The error is---> "Attempt 
to write a duplicate record to file CDEBP"......"RPG procedure detected an 
output record with a duplicate key field"

Can anyone see why I'd be getting this error?



*duplicate record error when updating CDEBP
F CDEBP     UF A E           K DISK

 *
 *  Get Record
C     CDEB_KEY02    CHAIN        CDEBP

 *
 * Make sure Record is NOT in CTRNP file
C      CTRN_KEY01    SETLL     CTRNP1
C                                   IF              %FOUND(CTRNP1)
C                                   EVAL        CTRNP_FLG = 'Y'
C                                   ELSE
C                                   EVAL        CTRNP_FLG = 'N'
C                                   ENDIF

 * Move Account "A" record into save fields
C                                  IF                 CTRNP_FLG = 'N'
C                                  EVAL          MVEFLG = '01'
C                                  EXSR          MOVE_DATA
 * Move saved Account "B"  record into Account "A" fields
C                                  EVAL          MVEFLG = '02'
C                                  EXSR          MOVE_DATA
C                                  UPDATE    CDEB
C                                  ENDIF

 C     *INZSR               BEGSR

C     CTRN_KEY01    KLIST
C                                  KFLD                    KF_ALP2
C                                  KFLD                    KF_NUM2
 *
C     CDEB_KEY01    KLIST
C                                  KFLD                    KF_ALP1
C                                  KFLD                    KF_NUM1
C                                  ENDSR


*Physical File DDS
A                                              UNIQUE
A          R CDEB
A              RP1ALP         5
A              RP1NUM       5S 0
A              BLA1            15
A              BLA2            10
A          K RP1ALP
A          K RP1NUM


--




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.