Adding Arguments to heavily used existing routine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
tracy
Participant
Posts: 47
Joined: Mon Aug 07, 2006 9:19 am

Adding Arguments to heavily used existing routine

Post by tracy »

We've got a routine with 5 arguments that's used in a lot of our jobs.

We would like to add another argument to this routine, but don't want to have to go in and modify all the jobs that currently call it. We'd rather just let a default value kick in if a value isn't provided.

But we are having a hard time trying to figure out how to do it without causing abortions in the jobs that refer to it.

My only thought at this point is to create a copy of the existing routine and add the new argument to this new routine. Then change the existing routine to simply call the new routine and supply a default parameter to the new argument.

Are there any other options?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a six-argument routine that is an interface to (that is, which calls) the five-argument routine. That is an easier approach to supplying the default value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tracy
Participant
Posts: 47
Joined: Mon Aug 07, 2006 9:19 am

Post by tracy »

I want to add the 6th argument and have the routine behave differently based on the value of it.

If I create a six-argument routine that simply calls the five-argument routine, what happens with that 6th argument? It can't be passed to or handled by the five-argument routine.

So I think I'm on the same page as you (having one routine call another), I just appear to be reading it the wrong way. I think I change my original five-argument routine to simply call a new six-argument routine.

Can you straighten me out?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you want different behaviour WITHIN the old routine then your way is to be preferred.

An alternative might be to load the sixth value into the job's user status area and have the routine pick it up from there.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tracy
Participant
Posts: 47
Joined: Mon Aug 07, 2006 9:19 am

Post by tracy »

Thanks, Ray! You are awesome!
Post Reply