undo changes

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
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

undo changes

Post by Luk »

Hi!

I am using transformer to divide one input strem into four outputs.
Order of my output links is as following:

1 output writes data to hashfile1
2 output inserts data into database table1
3 output updates data into database table1
4 output modifies data in hashfile1

I want that any changes in database table and in hashfile were made only if every four outputs links don't return any errors.
Another option is to undo any erlier changes (made in database and in hashfile) made by erlier links , if error occures .

Is there some way to do this in DataStage?

Thanks for help

regards
LUK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, you can certainly 'undo' database changes via either 0 commit levels and constraints that check for rejected records or transaction grouping if that's available in your database stage. The Output Link variables like REJECTED, REJECTEDCODE, DMBSERROR, etc are what I am referring to.

The hashed files are another matter. I've never tried, but the docs say you can enable the 'Backup' option in the stage and then it will be rolled back to its 'original state' if the job aborts and is reset. Typically, you need to rebuild them.

Sometimes you can 'simplify' your error checking by setting the database stages to 'treat warnings as fatal'. Then, any little problem will abort the job and initiate a rollback of any uncomitted rows.
-craig

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