How to reset a sequence (running number) generator
Moderators: chulett, rschirm, roy
The KeyMgtGetNextValue reads in the next value from a hash file named: SDKSequences under the project directory.
The SDKSequences has 2 columns: Key_Name and Next_value
Key_Name is the key of this hash file.
You can have a separate DataStage job to do the resetting or synchronization of the specific Sequence just before it is used in the next job; or do the "update" in the job control of the job which transformer will use the sequence.
When doing the resetting, you can enter the particular value via a parameter. OR most of the time, you would get the current max value from the database table, i.e. select max(cust_id) from d_customer
cwong
The SDKSequences has 2 columns: Key_Name and Next_value
Key_Name is the key of this hash file.
You can have a separate DataStage job to do the resetting or synchronization of the specific Sequence just before it is used in the next job; or do the "update" in the job control of the job which transformer will use the sequence.
When doing the resetting, you can enter the particular value via a parameter. OR most of the time, you would get the current max value from the database table, i.e. select max(cust_id) from d_customer
cwong
Hi
Logon using the administrator.
Go to the project that you want to reset the seqno. this is as if you generated a surrogate key.
Type in 'ED SDKSequences "the key name you use in the job"' this must be in the same case as specified in the job.
Press execute
l enter Show the last number
R 1 or the start number you want
press enter
fi
Press enter
this saves the counter
when you run your job it will start at 1
Regards
Hendrik Kuhn
Logon using the administrator.
Go to the project that you want to reset the seqno. this is as if you generated a surrogate key.
Type in 'ED SDKSequences "the key name you use in the job"' this must be in the same case as specified in the job.
Press execute
l enter Show the last number
R 1 or the start number you want
press enter
fi
Press enter
this saves the counter
when you run your job it will start at 1
Regards
Hendrik Kuhn