Page 1 of 1

Reading from Active Directory in Datastage 8.1

Posted: Thu Jan 07, 2010 3:31 pm
by dganeshm
Hi All,

Is it possible to read data from Active Directory (LDAP) and load into a table (Any Database for that matter). If yes how should I go about it. Any help is greatly appreciated.

Regards,
dganeshm

Posted: Thu Jan 07, 2010 3:58 pm
by eostic
JavaPack will do it nicely. You write your own class that reads your LDAP structure and integrates with the JavaPack api to write resulting data to a DataStage link.......DataStage invokes it from the one of the Java stages when the job is executed.

Ernie

Posted: Tue Jan 19, 2010 3:57 pm
by dganeshm
eostic wrote:JavaPack will do it nicely. You write your own class that reads your LDAP structure and integrates with the JavaPack api to write resulting data to a DataStage link.......DataStage invokes it from the one of the Java stages when the job is executed.

Ernie
Hi Ernie,

Thanks for the advice, I did write the java program and is ready to go.. now the problem i am facing is I am on a 3 tier architecture.. Websphere on 1 Box, Datastage Engine on the another. I am not sure where to put the class files and the ldap jar and set the class path, when I do a 'which java' on the Engine box it says no java.. wondering from where I should use java and how to set the classpath and java home for this one..

Posted: Wed Jan 20, 2010 7:43 am
by eostic
....using JavaPack means more than just writing a stand alone class....sorry I wasn't more explicit. You write your class according to the api as defined for JavaPack (it's not hard to adapt an existing one). Search thru the forum here...there are a ton of threads on it...I also have a sample at my blog url listed below.

...basically, you will be adapting your class so that the DataStage Job can invoke it in a local jvm (that DataStage loads) and then "talk" to it via input and output links......

...JavaPack is very well documented also...

Ernie

Posted: Wed Jan 20, 2010 8:12 am
by chulett
Hmmm... we did this using Perl writting to standard out. :wink:

Posted: Wed Jan 20, 2010 10:07 am
by dganeshm
eostic wrote:....using JavaPack means more than just writing a stand alone class....sorry I wasn't more explicit. You write your class according to the api as defined for JavaPack (it's not hard to adapt an existing one). Search thru the forum here...there are a ton of threads on it...I also have a sample at my blog url listed below.

...basically, you will be adapting your class so that the DataStage Job can invoke it in a local jvm (that DataStage loads) and then "talk" to it via input and output links......

...JavaPack is very well documented also...

Ernie
Hey Ernie,

I have actually written the Java class extending the Stage class using the tr4j.jar. The issue I am facing where should I be placing the java class..so that I can invoke it in the Java Client stage..
And what should I be giving in the Options tab of the Java Client stage in the JVM options??

Regards,
Ganesh