|
So your saying that you have PF A with LFs A1, A2 & A3. A3 is the unique keyed LF. Are any other LFs unique as well? I am assuming only one LF is unique at this point. You are updating through A1 changing a field that is a key in A3. If some other record has this new unique key value, you want to blindly delete it. Sound to me like you need to do some data base and application design. I have no files that I can blindly delete records from. But try added the unique LF into your program and checking as I suggested first. If you have multiple unique keyed LFs, Start by analyzing your data base design and getting rid of the unique key word where it is not needed. IMO a PF file should only have one unique key access path and that is what you use to update after you found the correct record through other access paths. Christopher K. Bipes mailto:ChrisB@Cross-Check.com Sr. Programmer/Analyst mailto:Chris_Bipes@Yahoo.com CrossCheck, Inc. http://www.cross-check.com 6119 State Farm Drive Phone: 707 586-0551 x 1102 Rohnert Park CA 94928 Fax: 707 586-1884 -----Original Message----- From: Dinesh_Goel@dtconsulting.com [mailto:Dinesh_Goel@dtconsulting.com] Sent: Wednesday, August 04, 1999 10:34 AM To: RPG400-L@midrange.com Subject: RE: RPG IV and CF-spec "keep it IBM" I can not do this because File A may have any logical file which is declared Unique on some other field. I am thinking some way of Error trapping using INFDS and some how retrieve the Duplicate Record's RRN and delete that record and rewrite the old one once again. Please suggest how to do this. Dinesh +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---END
As an Amazon Associate we earn from qualifying purchases.
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.