Page 1 of 1

Calling a windows application

Posted: Mon Apr 10, 2006 2:15 pm
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

Re: Calling a windows application

Posted: Mon Apr 10, 2006 2:25 pm
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

Posted: Mon Apr 10, 2006 3:18 pm
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.

Posted: Mon Apr 10, 2006 4:24 pm
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.

Posted: Mon Apr 10, 2006 4:26 pm
by DSguru2B
Kenneth,
I am doing some research on it. Thanks for the head start.

Posted: Mon Apr 10, 2006 4:35 pm
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.

Posted: Mon Apr 10, 2006 4:36 pm
by ray.wurlod
I suspect gateleys is running DataStage on a Windows platform rather than a UNIX platform.

Posted: Mon Apr 10, 2006 5:07 pm
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.

Posted: Tue Apr 11, 2006 6:34 am
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

Posted: Tue Apr 11, 2006 8:14 am
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?

Posted: Tue Apr 11, 2006 9:21 am
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]

What about Mono for running Windoze stuff from Unix?

Posted: Wed Jun 21, 2006 2:34 pm
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?