Page 1 of 1

Datastage

Posted: Tue Jan 24, 2006 6:14 am
by venkat_april
what is the diff between transform and routines?

Posted: Tue Jan 24, 2006 7:01 am
by kcshankar
Hi venkat,
There are two kinds of routine that you can write in DataStage,one is a Transform function, the other is a before/after subroutine.
Both Transforms and Routines are re-usable components, which are stored in the DataStage Repository.
Transform function routines are called for every row processed, so should be as lightweight as possible.
Before/after subroutines are executed once per job, so can perform some fairly heavy duty processing.
Search this forum,for more information

regards
kcs

Posted: Tue Jan 24, 2006 7:52 am
by ArndW
Venkat,

transforms are 1-line codes that are replaced at compilation time; whereas routines are functions that can be of any length you want and are called at runtime. If you change a transformation you need to recompile all jobs that use it; you need only recompile a routine once so that the changes get used in jobs. DataStage differentiates between two types of routines - the "normal" one which is in reality a function as it returns a value, and the "before/after" which is actually a subroutine and has a fixed number of parameters.