Surrogate Key Generator questions
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Actually i have tried with sequential file in stead of hash file.
i have created a sequential file with initial value of 1.
In the sequence i have placed a routine activity stage befor user variable activity stage,
In that routine activity stage i have called ExecSh and passed 'cat filename' as input argument.
In the user variable activity stage i have used 'routine.$ReturnValue as user variable.
While executing , the output SK are starting form 0.
But i am expecting from 1.
In the log ,i am able to see:
What i feel is $? value for that cat command is passed to the User variable and then thats passed as the key for SKG stage.
In stead of $? value,how to pass the actual result of cat command?
Thanks
i have created a sequential file with initial value of 1.
In the sequence i have placed a routine activity stage befor user variable activity stage,
In that routine activity stage i have called ExecSh and passed 'cat filename' as input argument.
In the user variable activity stage i have used 'routine.$ReturnValue as user variable.
While executing , the output SK are starting form 0.
But i am expecting from 1.
In the log ,i am able to see:
Code: Select all
CopyOfskg_seq..JobControl (ExecSH): Executed command: cat /work/crm/tem
*** Output from command was: ***
1
What i feel is $? value for that cat command is passed to the User variable and then thats passed as the key for SKG stage.
In stead of $? value,how to pass the actual result of cat command?
Thanks
pandeeswaran
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're not stripping the mapped newline from the command output. Search DSXchange for examples of how to do so.
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.
I'm curious why in the world you would have tried that? All I meant was for you to replace one set of brackets for another, not completely change the expression.pandeesh wrote:I have tried rtn.<$ReturnValue> .But it gives "Expected Expression".
What happens when you try rtn.$Returnvalue<1> there?
Making some assumptions here, one is that "rtn" is the name of the Routine Activity stage in question and that you accidentally left off the $ in your first example. I have no idea what "below symbol" you found in your googling as all I see are two boxes, doesn't really matter though as you are correct in that I meant use <> rather than [] for the array element notation.
-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:
Show us your routine code. In particular, what value are you putting into the Ans variable?
But why are you using a Routine activity at all? Surely an Execute Command activity would be more appropriate?
But why are you using a Routine activity at all? Surely an Execute Command activity would be more appropriate?
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.