Unit of work for Mainframe DB2

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Unit of work for Mainframe DB2

Post by JPalatianos »

Hi,
We are currently in the procees of upgrading from 7.5 to 8.0 and we have some consultants working on a project that requires an all or none commit on a few tables on Mainframe DB2. I am aware that we can control this in a given stage by setting the Rows Per Transaction to zero. But is it possible to have this all or none commit on a job level or a series of jobs. All teh tables involved get their changes and if any in the group fail all gets rolled back.
Thanks - - John
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The short answer is no, especially (and emphatically) for the 'series of jobs' question. The slightly less shorter answer is yes (in a single job) if you can manage to do all of your work in a single target database stage. It is still controlled at the individual link level but everything would be a single unit of work and any link aborting would cause everything to rollback.

There's also the dreaded Transaction Grouping, but that's another kettle of fish that forces an Array Size of 1 and commits every 'group' of links for each record so that you get an 'all or nothing' load record by record. And since each record group is committed (or rolled back) individually, it is rather... slow.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply