hi all;
i have 26,000 input records.
based on number of records, i need to genearte surroagte key sequence.
. i am using keymgtgetnextvalue(%sequence name%),
in sequence name i am giving input column totalnet assets which is unique for each row if it exists,
when i run the same job first time it's starting id =1,
when i run the jsame ob for second time it's starting id =2
when i run the jsame ob for third time its' id =3
what might be the problem?
thanks in advance.
generation of surroagte key
Moderators: chulett, rschirm, roy
Re: generation of surroagte key
You should give a name which is unique for the whole project but not input column which is changing for each record.bunny wrote:. i am using keymgtgetnextvalue(%sequence name%),
in sequence name i am giving input column totalnet assets which is unique for each row if it exists,
Give a name in single quotes something like 'Accounts'
your derivation should look like
Code: Select all
keymgtgetnextvalue('Accounts')
And this seed 'Accounts' is your project dependent. Whenever you feed this to your keymanagement routine you will get a new number.
Kris~
Re: generation of surroagte key
kris wrote:You should give a name which is unique for the whole project but not input column which is changing for each record.bunny wrote:. i am using keymgtgetnextvalue(%sequence name%),
in sequence name i am giving input column totalnet assets which is unique for each row if it exists,
Give a name in single quotes something like 'Accounts'
your derivation should look likeIt will generate unique numbers for each record. and when you run next time it will give you the next unique number.Code: Select all
keymgtgetnextvalue('Accounts')
And this seed 'Accounts' is your project dependent. Whenever you feed this to your keymanagement routine you will get a new number.
Kris~
" whats is the actual syntax for reseting current 'sequence' "
any answers for this regard
Many answers. A search on 'sdksequences' will turn up much discussion on the subject. As to a code sample:
Obviously, you'll need to make a couple of substitutions.
Code: Select all
UPDATE SDKSequences USING DICT VOC SET F1 = 'YourDesiredValue' WHERE @ID = 'YourSequenceName';
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It means that you've never successfully invoked either of the key management functions in that project. If you had, then the hashed file SDKSequences would have been created.
You can create it yourself if you wish, using the following command from the Administrator client's Command window.
Note that the file name is case sensitive.
You can create it yourself if you wish, using the following command from the Administrator client's Command window.
Code: Select all
CREATE.FILE SDKSequences 2 1 1
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.