Hi,
If a program, lets say, Pgm-X, makes calls to anotehr program, pgm-Y. Pgm-Y has got insert SQL queries but there is not commit coded in it. Once the pgm-Y is over and the control comes back to Pgm-X, it calls another program, pgm-Z which does inserts, now in thispgm-Z we get SQLCODE -911. Due to this, will this forc all the inserts done in Pgm-B to berolled back?
Regards.
SQLCODE= -911 and Rollback.
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: SQLCODE= -911 and Rollback.
I think you mean PROG-Y instead of PROG-B
If you have not done COMMIT inside PROG-Y or in PROG-X after calling PROG-Y the inserts done in PROG-Y will be rollbacked as well
You need to analyze the programs and understand the UNIT OF WORK
If you have not done COMMIT inside PROG-Y or in PROG-X after calling PROG-Y the inserts done in PROG-Y will be rollbacked as well
You need to analyze the programs and understand the UNIT OF WORK
zprogrammer
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: SQLCODE= -911 and Rollback.
Unless, you've an explicit COMMIT (which is not the case here, as you described) -- Yes, that will force all the inserts done in Pgm-Y to be rolled back, as Pandora-Box has said.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute