SQLRPGLE program executing at log off

20 pts.
Tags:
AS/400
SQLRPGLE
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?

Software/Hardware used:
IBM AS400

Answer Wiki

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

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
  • philpl1jb
    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.
    51,355 pointsBadges:
    report
  • TomLiotta
    "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
    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