Routine to repalace a routine in dsx.

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
anees1
Participant
Posts: 2
Joined: Fri Jun 22, 2007 12:37 pm
Location: Bangalore

Routine to repalace a routine in dsx.

Post by anees1 »

If there is a rotine 'X1' in a job & should be replaced by another routine 'Y1' using a routine can it be written in datastage or do we need a unix script for that.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no built method to do this. Can you just replace the code of X1 with Y1 and recompile the new contents of the routine?
anees1
Participant
Posts: 2
Joined: Fri Jun 22, 2007 12:37 pm
Location: Bangalore

if it is for one many no of jobs

Post by anees1 »

ArndW wrote:There is no built method to do this. Can you just replace the code of X1 with Y1 and recompile the new contents of the routine?
ur suggestion siuts for one job if there are n no of jobs using the routine then wat is the solution
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The first part of the solution is to write in English.

A similar manual solution exists for any N, where there are N jobs using the routine. You can determine which these are by performing a Usage Analysis on the Routine. For a sufficiently small N the amount of work is less than trying to script an "automatic" method.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Re: if it is for one many no of jobs

Post by JoshGeorge »

Same solution - ArndW suggested is what exactly you have to do if you have N number of jobs. If some other jobs are still referring to Y1, then you might have to take care of that scenario. Check if the number of parameters passing are the same (Type & Count). In that case you can try taking an export and replace all X1 with Y1 in your .dsx and import those jobs back.
anees1 wrote:
ArndW wrote:There is no built method to do this. Can you just replace the code of X1 with Y1 and recompile the new contents of the routine?
ur suggestion siuts for one job if there are n no of jobs using the routine then wat is the solution
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: if it is for one many no of jobs

Post by ArndW »

anees1 wrote:ur suggestion siuts for one job if there are n no of jobs using the routine then wat is the solution
If n jobs use this routine then by replacing the code and recompiling all n jobs will immediately use the new code.

The other routine would be to do a full export of all jobs, then manually edit the .dsx file and replace X1 with Y1 {assuming the number of parameters is the same}
Post Reply