Calling a windows application

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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Calling a windows application

Post by DSguru2B »

Hi,
I am wondering that can I call a windows .exe or .bat from datastage installed on unix.
The process I am looking forward and brainstorming myself is that I want to run a VB macro to process a few files on windows server. Can this macro residing on windows be called from DataStage .
Or in easy words, can I windows application be called using datastage and then get its result to start processing those files after being ftp'd to unix.
I am sure there is a limitation to this, but I want to have some thoughts on this.
Thanks
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Calling a windows application

Post by gateleys »

I have successfully run .vbs and .dll files created using VB.NET. Once they are created using Visual Studio or something, you need to register them using regsvr32 command in the DS server. Then, you can use the import external functions utility in the DS Manager. DS creates its own routine which makes a call to this external routine.

gateleys
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Google remsh, rlogin, rsh

All let you run commands on remote servers. DS jobs CANNOT start a graphical program, but can run straight DOS, perl, java, ksh, sh, and programs with stdin/stdout.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Neat.
gateleys
How do we register it using the regsvr32, can you just guide me on that. The datstage server is in HPUX not on Windows server.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Kenneth,
I am doing some research on it. Thanks for the head start.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Kenneth,
Saying Datastage would not start graphical programs, does that mean it will not run a "".EXE".
What I mean by .exe is that if there is an executable made in VB as mentioned above, can that be triggered using DS?
The output of the .exe shall be processed .csv files used in ETL by datastage. So I am trying to stream line the process using Datastage, or this is a complex and troublesome approach.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I suspect gateleys is running DataStage on a Windows platform rather than a UNIX platform.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
angelloader
Participant
Posts: 2
Joined: Sun Apr 09, 2006 1:12 pm
Location: France

Post by angelloader »

regsvr32 is a command for registring COM objects (exe, dll, ocx,...).

usually you register COM objects like this :
regsvr32 myexe.exe
regsvr32 mydll.dll
regsvr32 myocx.ocx

COM , DCOM best applied in environments that are Windows-based.
But some UNIX implementations exists.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

Yeah DSGuru2B, my DS Server runs on Windows. Hence, I was able to register the windows file. I dunno how that might be possible with UNIX. I guess you will have to write your program in shell scripts or Java.

gateleys
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Running java,VB or any other scripting language would require a compiler to be existant on the Unix machine.
As per my research so far, I think its not possible to run .exe on unix machines.
Please correct me if I have the wrong assumption.
Any thoughts on this Ray?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

For what it's worth, on my current project we're connecting HP-UX and Windows using a pair of custom sockets applications (client and server) each written in C.

The client (running on HP-UX) is wrapped as a custom stage for DataStage use, and the server (which just sits awaiting a connection request) runs on Windows2000. The messages we're sending are in XML (both directions), but you could use any format you fancied.

HTH,

J.
[insert pithy sig here]
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

What about Mono for running Windoze stuff from Unix?

Post by jdmiceli »

Hi all!

Is there any possibility Mono would help here. Since it allows the running of .Net type stuff, could DS tie into that functionality to do what DSguru wants to do?

Bestest?
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Post Reply