Difference between DS Transform, DS Routine, Function

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Difference between DS Transform, DS Routine, Function

Post by pnchowdary »

Hi Guys,

Could any of you please enlighten me on the various differences between DS Tranforms, DS Routines and Functions in Datastage?.
Thanks,
Naveen
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Thanks a lot Ken. :D
Thanks,
Naveen
slinni
Premium Member
Premium Member
Posts: 5
Joined: Thu Oct 13, 2005 5:24 am

Difference between DS Transform, DS Routine, Function

Post by slinni »

Sorry if this is very obvious..
Can we assume that this implies that transforms will give better performance when compared routines
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply