How to handle deletion in RPG

20 pts.
Tags:
RPG
I have a file(A) that needs to have records deleted from it based off information in another file(B). I think the logic should be... Read A Chain to B if criteria met delete record. Is there a better/cleaner way to do this? I do not have much experience with RPG.

Answer Wiki

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

No, you’ve got it, if there is a one-to-one ratio (one record in FileB would only match one record in FileA).

We would often write an audit report listing the records deleted
and perhaps why others weren’t

We would code it with an input parameter so you could
(‘R’) just run the report
(‘U’) run the report and update the file.

And then what happens to the entries in file b

Phil

———————-
CharlieBrown
I think this
“if criteria met”
will require that program acquire the record test values and if they are ok then delete.

Phil
———————-

Discuss This Question: 1  Reply

 
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
  • CharlieBrowne
    If you just want to delete and it is definitely a 1 to 1 releationship, instead of doing a chain and checking if found, you can just do a delete. If it is a one to many relationship, you can put the delete in a DO Loop
    41,430 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