Well, first of all, let me recommend that you minimize the size of your unit of work. If you are inserting millions...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
of rows without a COMMIT you are likely causing locking issues in your environment. The pages you have locked while you are waiting for your millions of inserts to finish are all unavailable to any other user of the table. That means any data on any page that you have locked cannot be read by anyone else until your unit of work is committed. Any other user running at the same time as you trying to get to any page you have modified would be getting -911 too.
That being said, you can control whether or not the work is rolled back automatically in CICS (on a thread basis) using an RCT or RDO parameter. The parameter is called ROLBE (RCT) or DROLLBACK (RDO). If it is set to YES a CICS SYNCPOINT ROLLBACK is issued and a -911 SQLCODE is returned to the program. If NO is coded, a CICS SYNCPOINT ROLLBACK is not issued and the SQLCODE is set to -913. You will have to programmatically either specify COMMIT or ROLLBACK for the unit of work.
I am not aware of a method of controlling this behavior for a batch program…
Dig Deeper on IBM DB2 management
Related Q&A from Craig S. Mullins
Our expert suggests that the best way to pass the SAP BW exam is to have hands-on job experience. But that's not all he has to say about ...continue reading
To export data from a DB2 table to a flat file, you need to run an export specifying the proper file format. The export utility exports data from a ...continue reading
Craig Mullins recommends two specific resources for learning how to create and support Binary Large Objects (BLOB) in DB2.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.