DS Job & dll library

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

DS Job & dll library

Post by ppalka »

Hi,

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

Regards,
Piotrek
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

The dlls and their usage mechanism are explained clearly in the manual
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post by ppalka »

You mean chapter: "Importing External ActiveX (OLE) Functions" or something else?

Regards,
Piotrek
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

It is part of the dsjob dlls that comes as online manuals pdf.
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post 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
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why not use the dsjob command?
Mamu Kim
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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? :?:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

I'm sorry Ray, I did not read the posting clearly.
John
Post Reply