Page 2 of 2

Posted: Mon Aug 14, 2006 11:55 am
by kduke
What version of DataStage are you on?

Posted: Mon Aug 14, 2006 1:14 pm
by RodBarnes
7.5 server

Posted: Mon Aug 14, 2006 8:33 pm
by kduke
Then you have the ability to use any argument on any routine call. Say you call MyRtn(Arg1,Arg2,Arg3) you can change the value of Arg3 and pass it back to the sequence. The sequence can use this in a parameter value for the next job. You used to get a warning if you changed the value of an argument. Now it is encouraged. What is the big deal?

When you go to select the parameter value then right click. Choose a Activity Variable. Pick the routine you just called. You can choose $ReturnValue, $RoutineName or any argument.

This is very powerful. I can do anything I want now. These are also available in UserVariable Activities. So you could loop based on some complicated formula in a routine. You can do almost anything with this.

I think all of this was available in 7.5. I just looked it up in 7.5.1A. Try it.

Posted: Mon Aug 14, 2006 8:42 pm
by chulett
kduke wrote:You used to get a warning if you changed the value of an argument. Now it is encouraged.
Really? I thought it still threw warnings when you compiled routines that did that... I'll have to go check that out, Mr Kim. :D

Posted: Tue Aug 15, 2006 6:06 am
by kduke
I think it still warns you but how else can you take advantage of this. The return values of a routine cause the sequence to fail. This is very powerful if used correctly. Ignore the warnings. This is cool. Surely others are using this functionality.

Posted: Thu Aug 17, 2006 9:06 am
by RodBarnes
Thanks. You are correct. I hadn't noticed that the parameters were listed there before.
kduke wrote:When you go to select the parameter value then right click. Choose a Activity Variable. Pick the routine you just called. You can choose $ReturnValue, $RoutineName or any argument.