Page 1 of 1

Difference between DS Transform, DS Routine, Function

Posted: Fri Sep 23, 2005 9:48 am
by pnchowdary
Hi Guys,

Could any of you please enlighten me on the various differences between DS Tranforms, DS Routines and Functions in Datastage?.

Posted: Fri Sep 23, 2005 10:18 am
by kcbland
Transforms: single lines of code that can be used in derivations and constraints. During compilation, the source code is substituted into the job design information and then compiled in. Changing the Transform requires recompiling all jobs that use it.

Routines: subroutines that are CALLed from a job or another routine. Usually they "do something" as opposed to transforming or calculating something. Changing a subroutine does not affect the caller as long as the arguments don't change.

Functions: user-created functions that can be utilized just like internal BASIC functions to derive or calculate something. As an external function, it is self-contained. It is used by jobs mostly in derivations and constraints. It is utilized inline during an expression, as opposed to CALLed.

Posted: Fri Sep 23, 2005 10:32 am
by pnchowdary
Thanks a lot Ken. :D

Difference between DS Transform, DS Routine, Function

Posted: Mon Oct 24, 2005 12:36 am
by slinni
Sorry if this is very obvious..
Can we assume that this implies that transforms will give better performance when compared routines

Posted: Mon Oct 24, 2005 1:11 am
by ray.wurlod
Yes, if you're worried about less than a millisecond in an entire job run. When a routine is first called (for row #1) it has to be found in the Catalog and loaded into memory. After that its exectuable code is in memory and its entrypoint address is cached.

The down side is that, if the definition is changed, then every job that uses the Transform must be re-compiled. This maintenance overhead does not apply for routines.

Welcome aboard! :D