SQLRPGLE program executing at log off

I wrote a simple SQLRPGLE program. It accepts a "from" and "to" code, deletes all records with the "to" code, then copies all "from" records, replacing the "from" code with the "to" code.
It runs fine, produces expected results.
When I log off the session which ran the program, even hours later, it seems to add back the records which were deleted when the program ran.
I've tried changing the commitment control, but that doesn't help.
I could possibly work it out eventually, but life is hard enough! Please can someone enlighten me?

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

Processing your response...

Discuss This Question: 2 &nbspReplies

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

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

It sounds like you've got the file journalled and commitment control rolls back the uncommitted changes. Either add the SQL command to not use commitment control at the beginning of your program
c+ set option commit = *none
or
add an SQL command COMMIT to the end of your program.

"I've tried changing the commitment control, but that doesn't help."
Since we can't see the programming, and we can't see how commitment control is defined in the job, there isn't much we can say. If changes are made and later undone, it's practically guaranteed to be due to an automatic ROLLBACK. So, best would be to run COMMIT as soon as the program logic reaches a point where it knows things are in the desired state.
.
Tom

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

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

To follow this tag...

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