How to create and implement datastage API programms

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

How to create and implement datastage API programms

Post 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
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post 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...
Pagadrai
Participant
Posts: 111
Joined: Fri Dec 31, 2004 1:16 am
Location: Chennai

Re: How to create and implement datastage API programms

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can also script the same thing using dsjob from the command line. FYI.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rager
Participant
Posts: 27
Joined: Tue Jul 17, 2007 11:23 pm
Location: UK

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup. For the record, there are dsjob command line equivalents for all of the "DSGet" functions.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply