Key Partition Incremental
Posted: Thu Mar 15, 2007 10:38 am
I am trying to create a DB2 commit incremental value of 2000. Every 2000 records processed, I write a commit transaction to a temp file. I tried the @INROWNUM, Stage Variables and simple Var + 1 mechanism only to be shut out due to partitioning. Every time a new partition is hit, the @INROWNUM, Stage Variables get set back to their default and start over. This defeats the 2000 row commit process.
Is there a way to process records adding 1 to the increment up to 2000, and then reset to start over at 1 with being forced by partitioning. I looked at the Surrogate key generator and searched throughout the forum to no avail. As I stated above, I created a Stage variable, incremented it by one but it gets reset to it's initial value when a record is written to another partition.
Is there a way to process records adding 1 to the increment up to 2000, and then reset to start over at 1 with being forced by partitioning. I looked at the Surrogate key generator and searched throughout the forum to no avail. As I stated above, I created a Stage variable, incremented it by one but it gets reset to it's initial value when a record is written to another partition.