Page 1 of 1

How to create and implement datastage API programms

Posted: Wed Mar 18, 2009 12:15 am
by prasson_ibm
Hi,
I want to write a datastage API program to get link information using the function DSGetLinkInfo.Can any one tell me that where i have to write this program and how can i call in my job.....?


Thanks in advance

Posted: Wed Mar 18, 2009 12:44 am
by Kryt0n
Making a wild assumption on your username I would say you are in the perfect place to find that out internally...

Do a search on the web (with something like "DataStage API"), I know a guide on creating it is out there somewhere having read it myself a little while ago.

From what little I remember, create a C/C++ program, once working, change the "main" function to the name of your app, compile (using a C++ compiler) as a library and that's about it...

Re: How to create and implement datastage API programms

Posted: Wed Mar 18, 2009 1:29 am
by Pagadrai
Hi,
to obtain the information you need, you can as well create a basic server routine.
Infact you can create a generic routine where you pass the job name, stage name and link name as params and the routine returns the info you want.
You can call this routine in After job subroutine or in in Sequence job.

Posted: Wed Mar 18, 2009 8:39 am
by chulett
You can also script the same thing using dsjob from the command line. FYI.

Posted: Sat Apr 18, 2009 7:45 am
by rager
chulett wrote:You can also script the same thing using dsjob from the command line. FYI. ...

Cool thanks Craig. This is exactly what I was looking for.

dsjob -linkinfo Project_Name Job_Name Stage_Name Link_Name

Posted: Sat Apr 18, 2009 8:18 am
by chulett
Yup. For the record, there are dsjob command line equivalents for all of the "DSGet" functions.