Page 1 of 1

DS Job & dll library

Posted: Tue Jul 19, 2005 2:01 am
by ppalka
Hi,

Can we execute in DS Job any program from dynamic library (dll)?

Regards,
Piotrek

Posted: Tue Jul 19, 2005 2:03 am
by Sainath.Srinivasan
The dlls and their usage mechanism are explained clearly in the manual

Posted: Tue Jul 19, 2005 3:22 am
by ppalka
You mean chapter: "Importing External ActiveX (OLE) Functions" or something else?

Regards,
Piotrek

Posted: Tue Jul 19, 2005 3:57 am
by Sainath.Srinivasan
It is part of the dsjob dlls that comes as online manuals pdf.

Posted: Tue Jul 19, 2005 4:09 am
by ppalka
Sainath.Srinivasan wrote:It is part of the dsjob dlls that comes as online manuals pdf.
I found only infrmation about using DS API. But it is not what i'm looking for. I have an external program implemented as dll library and I need to execute it. Just like a command stage works, but not for exe or shell command.

Regards,
Piotrek

Posted: Tue Jul 19, 2005 5:54 am
by ray.wurlod
You will need to be much more precise. Most DLLs contain multiple entrypoints, exposing more than one function. The individual functions are callable. It may be that your particular DLL contains only one function, but you did not say so.

It's not easy to call them, but you can set the functions up as being callable through the GCI from DataStage BASIC. You can then create a Routine containing that call. Download the GCI manual from IBM's UniVerse web site.

Posted: Tue Jul 19, 2005 6:06 am
by ppalka
ray.wurlod wrote: It's not easy to call them, but you can set the functions up as being callable through the GCI from DataStage BASIC. You can then create a Routine containing that call. Download the GCI manual from IBM's UniVerse web site.
So I think it will be much easier and faster to re-write source code of that library to standard executable app :)

Regards,
Piotrek

Posted: Tue Jul 19, 2005 9:39 am
by kduke
Why not use the dsjob command?

Posted: Tue Jul 19, 2005 12:19 pm
by ds_developer
DataStage on Windows can use ActiveX dlls. You have to import them using Manager - go to Import then External Function Definitions. If I remember correctly, the import process will create 2 routines (one you call and it calls the other). On v6.x, there was a bug related to in/out parameters in your call (search the forum, I think I posted some details). I doubt the bug has been fixed in 7.x.

John

Posted: Tue Jul 19, 2005 3:25 pm
by ray.wurlod
Yes, but why would you want to run a job if the job's already running and calling a function exposed in the DLL? :?:

Posted: Tue Jul 19, 2005 4:42 pm
by ds_developer
I'm sorry Ray, I did not read the posting clearly.
John