Getting current value from SDKSequences

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
sbass1
Premium Member
Premium Member
Posts: 211
Joined: Wed Jan 28, 2009 9:00 pm
Location: Sydney, Australia

Getting current value from SDKSequences

Post by sbass1 »

In Routines\SDK\KeyMgt, we have KeyMgtGetNextValue and KeyMgtGetNextValueConcurrent, but no KeyMgtGetCurrentValue (i.e. no increment).

Is this as simple as creating a transform such as:

UtilityHashLookup("SDKSequences",<desired key>,"")

It needs to run concurrently, but is just a read not an update.

I tested this in a snippet of BASIC code and it worked OK...just checking if this is best practice and no concurrency issues.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'll be fine, but I'd suggest you actually create your KeyMgtGetCurrentValue routine (from the non-concurrent 'next value' version) just from the standpoint of it being more obvious what is going on.
-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 »

Or you can simply use a Hashed File stage pointed at SDKSequences with "made up" metadata - one VarChar (key) column and one integer column.
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