Page 1 of 1

Routine to repalace a routine in dsx.

Posted: Fri Jun 22, 2007 12:46 pm
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.

Posted: Fri Jun 22, 2007 4:33 pm
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?

if it is for one many no of jobs

Posted: Sat Jun 23, 2007 1:14 am
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

Posted: Sat Jun 23, 2007 6:35 am
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.

Re: if it is for one many no of jobs

Posted: Sat Jun 23, 2007 8:00 am
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

Re: if it is for one many no of jobs

Posted: Sat Jun 23, 2007 8:28 pm
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}