KeyMgtGetNextValueConcurrent
Moderators: chulett, rschirm, roy
KeyMgtGetNextValueConcurrent
Hi,
Iam using a KeyMgtGetNextValueConcurrent function in my job . When I am using in development environment it is generating numbers like this CBL1 to CBL100 and If I ran second time it is generating from CBL101 to CBL200 but when I am using for testing it is generating from CBL1 to CBL100. But I want from CBL201 to CBL300.
My doubt here is when I change server from development to testing is this function generate number from starting example from 1.
Thanks,
Somaraju.
Iam using a KeyMgtGetNextValueConcurrent function in my job . When I am using in development environment it is generating numbers like this CBL1 to CBL100 and If I ran second time it is generating from CBL101 to CBL200 but when I am using for testing it is generating from CBL1 to CBL100. But I want from CBL201 to CBL300.
My doubt here is when I change server from development to testing is this function generate number from starting example from 1.
Thanks,
Somaraju.
somaraju
-
- Charter Member
- Posts: 19
- Joined: Sun Jul 20, 2003 4:29 am
Re: KeyMgtGetNextValueConcurrent
somu_june wrote:Hi,
Iam using a KeyMgtGetNextValueConcurrent function in my job . When I am using in development environment it is generating numbers like this CBL1 to CBL100 and If I ran second time it is generating from CBL101 to CBL200 but when I am using for testing it is generating from CBL1 to CBL100. But I want from CBL201 to CBL300.
My doubt here is when I change server from development to testing is this function generate number from starting example from 1.
Thanks,
Somaraju.
Hi,
As the name suggests "KeyMgtGetNextValueConcurrent" , this function will generate the sequential numbers based on the other jobs and also on history. If you want to a specific key values, I do not think you should use these functions at all.
If you want to share a sequence for use in multiple projects, you will need to copy the function and replace the OPEN statement as well as the file creation one with OPENSEQ and shell call to mkdbfile so that the KeyMgtGetNextValueConcurrent uses the same physical file no matter which project is calling it. If your environments are on different machines or use different instances then you cannot use this method, as record level locking across nodes is no longer supported in DataStage (it rermains functional in UniVerse but has been removed in the DS flavor).
Hi Arnd,
My problem here is already there are numbers generated by the job I mean by keymgtnextvalueconcurrent like CBL1 to CBL100 in my DB2 table. MY aim is to take the maximum number that is CBL100 and I want to generate CBL101 to CBL200 for my next run of the same job even though they are of different projects. How to achieve this , if you have any idea please let me know.
Thanks,
SomaRaju.
My problem here is already there are numbers generated by the job I mean by keymgtnextvalueconcurrent like CBL1 to CBL100 in my DB2 table. MY aim is to take the maximum number that is CBL100 and I want to generate CBL101 to CBL200 for my next run of the same job even though they are of different projects. How to achieve this , if you have any idea please let me know.
Thanks,
SomaRaju.
somaraju
Dont use that function then.
Design your job in sucha way that it gets the max from the table which in your case will be CBL100.
Strip out the numbers which will be 100 and do max+1 and concatenate it to CBL. Use that as your key for the target db.
Design your job in sucha way that it gets the max from the table which in your case will be CBL100.
Strip out the numbers which will be 100 and do max+1 and concatenate it to CBL. Use that as your key for the target db.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.