How to Reset Routine(KeyMgtGetNextValue)?

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
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

How to Reset Routine(KeyMgtGetNextValue)?

Post by A_SUSHMA »

Hi All,


How to reset the value to zero for "KeyMgtGetNextValue" before my process runs each time?
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Search for "UPDATE SDKSequences"
You are the creator of your destiny - Swami Vivekananda
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

One such example here. However, if your sequence always starts at zero each run then there's really no need to be using a sequence. Why not simply increment a counter?
-craig

"You can never have too many knives" -- Logan Nine Fingers
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

Post by A_SUSHMA »

Hi Chulett,

I need to increment the audit table each time the condition is not satisfied.The audit table is used through out the process.I mean around 10 jobs.In each transfermor I need to incremnt the audit table
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So a global sequence... that's fine. Just wanted to make sure we understood how it was being used.
-craig

"You can never have too many knives" -- Logan Nine Fingers
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

Post by A_SUSHMA »

Each time I need to reject a record or the record is bypassed then audit table is incremented. I am using the Routine KeyMgtGetNextValue
.I will call this function each time when the record is by passed or reject.once the process completed successfully.Next day when I want to run the process I want to reset the KeyMgtGetNextValue
Please let me know how to reset?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Asked and answered. There was a suggestion to search as you're not the first person to ask that question and I posted a link to one such search result. There are several.
-craig

"You can never have too many knives" -- Logan Nine Fingers
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

Post by A_SUSHMA »

I am asking how to reset the KeyMgtGetNextValue to ZERO, Once the process completed...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you get this working? If not, are you having an issue with the command itself (which a search would have turned up) or the actual means of how to incorporate it into your processing?

For the latter, it would seem like you could do this either at the very beginning or end of your processing. Do you have a single step that encompasses either end? You could do this 'Before Job' in the first step or 'After Job' in the last step. Or as part of a Sequence job if that is controlling things.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply