Add function to datastage routines or Transforms

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
Toly_xiang
Participant
Posts: 9
Joined: Tue Apr 15, 2003 3:27 am
Location: China
Contact:

Add function to datastage routines or Transforms

Post by Toly_xiang »

how to add a function to datastage routines or transforms ?
I am a jackaroo.
I have a function that was writted in C language
I want add this function to datastage routines or transforms.
and how to do ?
thanks.
[:)]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can call C functions from DataStage BASIC using an interface called the General Call Interface (GCI). But it's not easy to set up.
To set it up you must create a definition of the subroutine (so that DataStage knows how many arguments, and whether they need to be converted between DataStage's "typeless" environment on input, or on output, or on both. This definition also determines the size of the scratch area created to perform those conversions.
The hard part is that you then have to built a new version of the DataStage executable (dssh) on UNIX, or the DLL (on Windows). This process is fraught with danger for those unfamiliar with it; get expert help!
Alternately, do you really have to have it written in C? DataStage BASIC is a very flexible and very powerful language; it is probably much easier, and much less error-prone, to rewrite your function in DataStage BASIC.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply