I have a question about the topic in this thread but it is not clear how it could work. I have a parameter set and I try to get the value of a parameter from it in a routine.
kurics40 wrote:Sorry that I hijacked this thread but it is not clear how it could work.
There's a simple solution - don't hijack threads. Start your own thread and link to the other one, something I've done for you here. That way you are in full control of its destiny.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod wrote:Where is the Ans variable in DSLogInfo() assigned its value? ...
The Ans variable get -1 value from the begining.
I don't give a serious role of Ans variable.
For testing purpose I tried to print the source parameter in the DS director log to see when it could pick up/assign the correct value from the parameter set.
I don't think I can help, because I can't see anything wrong with your code. Are you sure the parameter set is set up correctly? Can you see the values in it from a normal DataStage job? What does it say in the log when you execute the routine from a job? Are there any warnings? If it aborts then try and reset it and see if there is a log entry called From Previous Run. If you use the routine test bed and double click on the result does it give you any more information?
Look carefully, there is normally a clue somewhere!
Regards,
Jean
_______________________________________
"If I had asked people what they wanted they would have said faster horses"
Henry Ford
Is "connection_test" definitely the name of your parameter set (and not the name of the calling job since you tried to attach to it)
Have you got the case correct? Is the parameter set declared in the job calling the routine? Have you corrected your call to DSLogInfo? If DataStage is defaulting Ans to null, you may just be erroring in your output rather than anything else in the code
Thanks a lot your fast respond. Yes, the script works.
The mistake was that I tried to reach the parameter set from a sequence with an embeded routine inside on that way I didn't add the parameter set to the sequence. I thought It is possible without it.
My purpose is that to write a routine with given parameters which routine can replace a parallel job because it has the same input parameters.
Alternatively I can create another sequence where I include the parameter set and I attach/invoke that sequence from the routine and get the values of them.
Kryt0n wrote:..Is the parameter set declared in the job calling the routine?
Hello Kryt0n,
Do you know a script way to declare the parameter set rather than add it in the host job which call the routine where I want to reach the parameter set?
I would like to know that how is it possible refere to a parameter set's variables like an independent object and get its values externally eg.: from a routine.
I need this because password encryption option. If it doesnt work I can read it from a file what only dsadm can read but how will I ask the management to deploy it on the PROD....?