Page 1 of 1

External Target Stage

Posted: Tue Jan 16, 2007 5:10 am
by rana_s_ray
Hi,
We have a generic datastage job that processes a variety of input files, and creates a set of output files. We need to ingest the output files into SQL database. We thought of using a C++ program to do the same. We have written a C++ program which takes a file as an input and opens a DB connection and inserts into the database. But when we try to invoke it as a DataStage routine, we get problems because of the ADO.DB connection errors, which I suppose are not recognised in Linux. I thought we can look at the External Target Stage and see how to use it but could not find any samples. Can anyone walk me through on how to use the External Target Stage? Does the program have to execute in the DataStage server itself, or it can be executed in, for example the db server? Any inputs are welcome.

Posted: Tue Jan 16, 2007 5:28 am
by kumar_s
Suggestion - The C++ code that you have written, can be made to give output corresponding to the given input so that the database can be handled in datastage with the available stages.
You can post your requirement, so that, alternate methods can be discussed to get max out of datastage functionality.
Reg the database errors, make user that you close the database connection that you open, reason, being, the routine might get invoked for every row that you give as input.

Posted: Tue Jan 16, 2007 6:09 am
by rana_s_ray
kumar_s wrote:Suggestion - The C++ code that you have written, can be made to give output corresponding to the given input so that the database can be handled in datastage with the available stages.
[RANA] - the c++ code actually takes in an input file, and has to insert the records in the file to a target database which is in SQL2005.
You can post your requirement, so that, alternate methods can be discussed to get max out of datastage functionality.
Reg the database errors, make user that you close the database connection that you open, reason, being, the routine might get invoked for every row that you give as input.
[RANA] We are not getting database errors. At execution time the libraries which are used (ADO.DB) are not found in Linux and so we get errors that some programs being referred to are not available.

Posted: Tue Jan 16, 2007 5:37 pm
by kumar_s
Arent all the libraries are compiled and stored in the path where the routine is called? If not arent the path been included in the LIB path?