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.
[:)]
Add function to datastage routines or Transforms
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Tue Apr 15, 2003 3:27 am
- Location: China
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
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