Page 1 of 1

calling c dll functions from Datastage

Posted: Fri Jan 26, 2007 3:00 am
by PeterPol
Hello,

On several other posts I read that it is possible to call external dll functions written in C. I also read that it's not easy to do so. Although I am not an experienced Datastage developer, I do want to give it a try. As a start I downloaded the Universe GCI guide. Here it is said that, to begin, I should log on to the Universe Administrator to use GCI. Where can I find this Administrator? Is it shipped with Datastage?

Peter

Posted: Fri Jan 26, 2007 3:10 am
by ArndW
PeterPol,

when you install the DataStage client on your PC you will get 4 programs:
Designer
Developer
Manager
Administrator


and the last one is what is being referred to. I prefer to open up a telnet session with whatever tool I have and then entering the TCL environment from that shell (after setting the environment with the dsenv script). I find this much easier - mainly because I've been using that method to access UniVerse for a while (I think the keyboards&monitors were still steam-powered back in those days, but can barely remember).

Posted: Fri Jan 26, 2007 8:33 am
by ArndW
Moderator/Ray - but using the GCI is a Server question so I think the original question refers to Server and not parallel, but only PeterPol can tell us for sure

Posted: Fri Jan 26, 2007 8:42 am
by PeterPol
hi,

If calling an external function is only possible from a server job then i have chosen the wrong forum...

Peter

Posted: Fri Jan 26, 2007 10:54 am
by ArndW
No, you can call external functions from both types DataStage but doing so from PX is much simpler and better documented. If I understood the last post correctly then this does belong in the PX forum.

Posted: Fri Jan 26, 2007 5:06 pm
by ray.wurlod
DataStage server jobs on Windows can use functions exposed in ActiveX controls. You do not need to use the GCI explicitly to call these. Beware, though, that performance sucks.

There is a mechanism for calling other C functions, but in this case you do need to set up "GCI subroutine definitions". This is quite a technical area, but is documented in a manual called UniVerse GCI Guide (note that this is a UniVerse manual, not a DataStage manual). I am not sure whether user-defined GCI calls will still be possible in version 8.0 and beyond.

Posted: Tue Jan 30, 2007 3:20 am
by PeterPol
Hello,

When I run a job I get the following log warning:

DataStage Job 347 Phantom 1728
Error 126 loading GCI library C:\\Ascential\\DataStage\\Engine\\bin\\ultradll.dll.
The specified module could not be found.
DataStage Phantom Finished

Even though I removed ultradll.dll from this directory. (the dll was there because I was experimenting with preparing/calling a dll-function).

Need some help......

Peter

Posted: Tue Jan 30, 2007 3:40 am
by PeterPol
Hello,

The dll was still in the Universe standard library list. This list can be viewed in gci.admin, option 7. Deleting the dll from this list solved my problem :)

Peter