RPG 3 duplicate record error handler

5 pts.
Tags:
Duplicate records
Error handling
Physical File
RPG
The physical file has a field keyed and unique. If i want to update these to RPG 3 program it is showing a duplicate record error. Does anybody have solution? tell me the command to handle this error only for RPG 3.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello
By using CHGPF u can update in Physical file,so that u can update the program u r Rpg program
When already the datbase iS Set with UNIQUE AND KEY FIELD SO U CANNOT DO DIRECTILY CHANGE
SO fIRST change the database
so that it i seasy to do

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gilly400
    Hi, You can add an an error indicator to your WRITE operation code in your RPG - then the program won't stop on duplicate records - if an error occurs when executing the write operation the indicator will be switched on - then you can condition what you do in your program using the indicator. Normally I would write the duplicate records to an error file or ignore them (depending on what they are). Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • TomLiotta
    No one should be updating RPG III code. Convert it to RPG IV if you need answers. Use the CVTRPGSRC command to do the conversion, then ask how to handle duplicate keys correctly. Continued maintenance of RPG III is a professional disservice to the employer. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following