Page 1 of 1

Implementing a Sequence generator in Datastage tx 8.1

Posted: Fri Jul 31, 2009 8:14 am
by kiranredz
Is there an option to implement Sequence generator/surrogate key generator functionality in Datastage TX 8.1; without the use of database create sequence?

Re: Implementing a Sequence generator in Datastage tx 8.1

Posted: Fri Jul 31, 2009 11:28 am
by rep
kiranredz wrote:Is there an option to implement Sequence generator/surrogate key generator functionality in Datastage TX 8.1; without the use of database create sequence?

If I'm reading you correct, you have your DB key as an incrementing numeric and want to use TX to grab the next number?

If so...and it's been a few years...I think I had my initial map of the system do an SQL SELECT MAX KEY FIELD, then that map would add 1, then put that record into the DB as soon as it got the number as a "create". Then I would pass that number to the map doing the adding, build the record, and do an UPDATE to the record with that sequence number.