Unique Sequence Number

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
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Unique Sequence Number

Post 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....??
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Unique Sequence Number

Post by sachin1 »

yes it will create a unique number everytime you execute your job.
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Post 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 ?
Hemant_Kulkarni
Premium Member
Premium Member
Posts: 50
Joined: Tue Jan 02, 2007 1:40 am

Post by Hemant_Kulkarni »

search on KeyMgmtGetNextValue will give you all the details.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
Last edited by chulett on Tue Jul 03, 2007 7:46 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Non-concurrent does not prevent others from using different sequences. Concurrent allows multiple processes to retrieve keys from the same sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Re: Unique Sequence Number

Post 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....??
Post Reply