Warnings from routines returning other than 0

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

What version of DataStage are you on?
Mamu Kim
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Post by RodBarnes »

7.5 server
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Post 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.
Post Reply