Hello,
We have these C/C++ APIs which does some extremely complex calculations to the input data and returns the desired result. We would like to be able to call these functions as part of our transformation. Is it possible to call C/C++ or Java APIs in a datastage server job (or routine)?
Thanks
Can I call C/C++ API from within datastage server?
Moderators: chulett, rschirm, roy
Hello SPA_BI,
DataStage contains a facility for binding in external objects such as c/c++ routines. This is documented for the UniVerse product in the UniVerse GCI Guide. I've done this in previous versions where DataStage and UniVerse were still the same product and it has always been a bit tricky and complex as it also involves creating a new executable. I would ask your support provider if this functionality is still part of DataStage before beginning the work. One of the issues with the GCI is that the work needs to be redone at each DataStage release.
Even if the GCI is still supported I would recommend that you write a program wrapper around your routines and use the UNIX call mechanisms in DataStage to pass parameters in and get results back. This will have a much higher overhead then a procedure call and would only work if your volumes aren't huge or processing time is not at a premium.
DataStage contains a facility for binding in external objects such as c/c++ routines. This is documented for the UniVerse product in the UniVerse GCI Guide. I've done this in previous versions where DataStage and UniVerse were still the same product and it has always been a bit tricky and complex as it also involves creating a new executable. I would ask your support provider if this functionality is still part of DataStage before beginning the work. One of the issues with the GCI is that the work needs to be redone at each DataStage release.
Even if the GCI is still supported I would recommend that you write a program wrapper around your routines and use the UNIX call mechanisms in DataStage to pass parameters in and get results back. This will have a much higher overhead then a procedure call and would only work if your volumes aren't huge or processing time is not at a premium.