Page 1 of 1

SQLCODE= -911 and Rollback.

Posted: Mon Jan 05, 2015 11:38 am
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.

Re: SQLCODE= -911 and Rollback.

Posted: Mon Jan 05, 2015 12:22 pm
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

Re: SQLCODE= -911 and Rollback.

Posted: Tue Jan 06, 2015 11:38 am
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.