KeyMgtGetNextValueConcurrent routine

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
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

KeyMgtGetNextValueConcurrent routine

Post by ketfos »

Hi,

Under repository, - Routines - SDK, there are routines KeyMgtGetNextValueConcurrent
KeyMgtGetMaxKey
KeyMgtGetMaxKeyFromODBCToUSER
KeyMgtGetNextValue

When I go to Transformer, Select DSROUTINES - Routines - SDK, I se only one routine
KeyMgtGetMaxKeyFromODBCToUSER

Can you tell me how to view other SDK key routines in Transformer?

Thanks

ketfos
ketfos
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

i guess you need to customize that!
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could try making sure that they're compiled. Are they perhaps to be found under DS Functions rather than Functions in the operand menu?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Those have transforms associated with them, from what I remember. Once those are in place they no longer appear in the list of routines.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Thanks.
yes it has transform associated with it.
That is why it is not displayed...

The description of this routine is ---

"Routine to generate a sequential number.

The routine argument is the name associated with the sequence.

The routine uses a file to store the next available number. It reads the number from the file on each invocation; a lock on the file prevents concurrent access."

Where is the file stored? Is it internal to datastage?

Ketfos
ketfos
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Source for the routine should be in your Repository under the Routines branch.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In there you'll see it uses an account-based hashed file (type 2 from what I recall) to store the values you've passed in and the current surrogate for each value.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

SDKSequences hash file

Post by ketfos »

KeyMgtGetNextValueConcurrent - I used this in the transformer KeyMgtGetNextValueConcurrent(1) in one job and KeyMgtGetNextValueConcurrent(2) in another job.

I ran the first job for 100 rows and second job for 10 rows.
It generated the key values starting from 1..100 and 1..10 in each case.

I see a hash file SDKSequences in the project folder.
When I query the hash file using select * from SDKSequences, it returns two records with value 1 and 2.

How do I set the counter to start value of 1 for each of the job.
i.e i want surrogate key generation to start from 1.

Thanks
Ketfos
ketfos
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you Search DSXchange for an answer?
This post has three different techniques.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply