Page 1 of 1

Difference between Routine and Transform

Posted: Thu Feb 02, 2006 3:02 am
by sudhakar_viswa
Hi,

I know that Routine will return only one vale.Is it right or wrong,reply me.And what is the difference between Routine and Transform.


Thanks,
sudhakar

Posted: Thu Feb 02, 2006 3:07 am
by kumar_s
Search

-Kumar

Posted: Thu Feb 02, 2006 3:09 am
by sudhakar_viswa
Hi,

I have searched so many times,but the thing is idid not get correct information.

Thanks,
sudhakar

Posted: Thu Feb 02, 2006 3:12 am
by kumar_s
If you could click on the 'Search' in the previous post you can get one :wink:

-Kumar

Posted: Thu Feb 02, 2006 3:12 am
by ArndW
Although the topic has been covered several times, the answer isn't that complicated. A DataStage "Routine" is actually a function in most programming languages, it takes 0 through 254 arguments and returns a single value value. A DataStage transform is effectively also a function in that the whole transform gets evaluated to a single value at runtime,but the difference is that when you use a transform in a DataStage job the contents of the transform are inserted into the job at compile time; Routines are called by reference.

One difference is that when you change a transform you will need to recompile all jobs that use it and you do not need to do that with Routines. Since transforms don't have the overhead of calling a catalogued routine they execute faster than routines. Transforms are limited to single-line constructs while Routines can be very long and complex programs.

Posted: Thu Feb 02, 2006 3:18 am
by sudhakar_viswa
Hi,

Thanks arnd.

Thanks,
sudhakar

Posted: Thu Feb 02, 2006 8:00 am
by ArndW
I have to say that the official training is wrong on point (1) and although strictly speaking point (2) isn't incorrect it doesn't explain the major difference in how the code is executed at runtime.

The initial purpose might have been to use specific data type and elements in transforms, but it is not controlled and the purpose of a transform is not to transform from one data type to another.

The technical term for what transforms do is "inline expansion".

Posted: Thu Feb 02, 2006 8:22 am
by srividya
Thanks Arnd for the info