SQLCODE= -911 and Rollback.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Ashok Kumar
New Member
Posts: 3
Joined: Fri Aug 15, 2014 6:14 pm

SQLCODE= -911 and Rollback.

Post by Ashok Kumar »

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.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: SQLCODE= -911 and Rollback.

Post by zprogrammer »

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
zprogrammer
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: SQLCODE= -911 and Rollback.

Post by Anuj Dhawan »

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.
Post Reply

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

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”