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



How do you get the values of SV1RP1ALP And SV1RP1NUM?

Bill H

-----Original Message-----
From: Frank W. Kany IV [mailto:frank.kany@burr-reid.org]
Sent: Wednesday, September 04, 2002 1:27 PM
To: rpg400-l@midrange.com
Subject: Re: duplicate record error when updating a physical file



I hope this helps.

*
C     CDEB_KEY02    KLIST
C                                 KFLD                    KF_ALP2
C                                 KFLD                    KF_NUM2

 * part of MOVE_DATA subroutine
C                   WHEN      MVEFLG = '02'
C                   EVAL      RP1ALP = SV1RP1ALP
C                   EVAL      RP1NUM = SV1RP1NUM
C                   EVAL      BLA1   = SV1BLA1
C                   EVAL      BLA2   = SV1BLA2



Frank W. Kany IV
The Law Offices of Burr & Reid
www.burr-reid.org
----- Original Message -----
From: "Steve Landess" <steve_landess@hotmail.com>
To: <rpg400-l@midrange.com>
Sent: Wednesday, September 04, 2002 1:20 PM
Subject: Re: duplicate record error when updating a physical file


> I don't see the definition of the keylist CDEB_KEY02  or the subroutine
> MOVE_DATA in the sample code that you submitted, but the error can occur
if
> you CHANGE the value of one of the key fields of the file that you are
> attempting to update.  In this situation, the Update operation will fail
if
> there is already a record in CDEBP that has this key value, since it has
> UNIQUE specified.
>
>
> ----- Original Message -----
> From: "Frank W. Kany IV" <frank.kany@burr-reid.org>
> To: "RPG Mailing List" <rpg400-l@midrange.com>
> Sent: Wednesday, September 04, 2002 11:47 AM
> Subject: duplicate record error when updating a physical file
>
>
> > 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
> >
> >
> > --
> >
> >
> > _______________________________________________
> > 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.
>
>


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