Page 1 of 1

Unique Sequence Number

Posted: Tue Jul 03, 2007 12:57 am
by cosec
ID=KeyMgtGetNextValue(JobName)

Will This routine create unique keys ??? everytime the job is run....

I will be inserting records to a target table and I don't want it to have the same ID...

Is this sufficient....??

Re: Unique Sequence Number

Posted: Tue Jul 03, 2007 3:03 am
by sachin1
yes it will create a unique number everytime you execute your job.

Posted: Tue Jul 03, 2007 4:12 am
by cosec
Where is this Value stored ? Is there a table Datastage uses to store this value ? and is there a way to change this value ?

Posted: Tue Jul 03, 2007 4:27 am
by Hemant_Kulkarni
search on KeyMgmtGetNextValue will give you all the details.

Posted: Tue Jul 03, 2007 7:17 am
by chulett
Double-click on the routine to examine the source code. You'll need to use the 'Concurrent' version instead if others will be needing sequences for the same table at the same time.

Posted: Tue Jul 03, 2007 7:36 am
by ray.wurlod
Non-concurrent does not prevent others from using different sequences. Concurrent allows multiple processes to retrieve keys from the same sequence.

Posted: Tue Jul 03, 2007 7:37 am
by DSguru2B
cosec wrote:Where is this Value stored ? Is there a table Datastage uses to store this value ? and is there a way to change this value ?
Search on SDKSequences.

Re: Unique Sequence Number

Posted: Tue Jul 03, 2007 8:34 am
by cosec
Thanks a Lot guys
cosec wrote:ID=KeyMgtGetNextValue(JobName)

Will This routine create unique keys ??? everytime the job is run....

I will be inserting records to a target table and I don't want it to have the same ID...

Is this sufficient....??