This works fine. Thanks. Invoking the key management routines from a routine activity doesn't seem to work though fyi. Returns the same result as calling them in an User Variables activity.ray.wurlod wrote:You can't use the DataStage SQL directly. You could use an Execute Command activity to invoke the DataStage shell (dssh) to execute the command.
KeyMgmt Function
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
Tony
BI Consultant - Datastage
BI Consultant - Datastage
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
Ah well when I said doesn't work I meant that the variable wasn't getting initialized to 0 at the beginning of each run. So I have to run the command:
$DSHOME/bin/dssh "UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID = 'ID';" through an Execute Command activity anyway before entering the loop. Once inside the loop I have a choice of either calling KeyMgtGetNextValue and assigning the value derived in a User Variable stage or using a Routine Activity to call the routine KeyMgtGetNextValue and then using its return.
$DSHOME/bin/dssh "UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID = 'ID';" through an Execute Command activity anyway before entering the loop. Once inside the loop I have a choice of either calling KeyMgtGetNextValue and assigning the value derived in a User Variable stage or using a Routine Activity to call the routine KeyMgtGetNextValue and then using its return.
Tony
BI Consultant - Datastage
BI Consultant - Datastage
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Of course that query will initialize the ID sequence to 1, not to 0. But otherwise it should be OK. You need to query (via the routine) to get the next value even after initialization.
Is it now working? If so please mark the thread as resolved.
Is it now working? If so please mark the thread as resolved.
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.