Get results from a Windows .exe from a UNIX box

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
MR Guy
Participant
Posts: 4
Joined: Sat Apr 20, 2002 8:23 am

Get results from a Windows .exe from a UNIX box

Post by MR Guy »

I'm looking for an elegant way to have a DS job on a UNIX box send a signal to an .exe file on a Windows box and get the standard command output returned to the UNIX box. :?
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

What don't you like about remsh, rlogin, rsh, etc?
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
MR Guy
Participant
Posts: 4
Joined: Sat Apr 20, 2002 8:23 am

Post by MR Guy »

Making the call to the Windows box isn't as much of a problem as getting the results returned to the UNIX box. In this particular case, expecting a long string (of undetermined length) in xml format.
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post by jzparad »

Is it possible to use rsh to a Windows box?

I wasn't aware that you had those sort of services on Windows. You can certainly run rsh from Windows to Unix but I'm not so sure about the other way around unless you have SFU installed.
Jim Paradies
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Post by shawn_ramsey »

Microsoft even offers one called Windows Services for Unix http://www.microsoft.com/windowsservers ... fault.mspx
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post by jzparad »

Back to the original question.

I guess the most, if not only, elegant way is to use something like ComBridge
http://www.octatec.co.uk/CB_sum.htm which allows you to access COM objects on Windows. This assumes that you have a COM object to run or can write one.

Your original problem stated
I'm looking for an elegant way to have a DS job on a UNIX box send a signal to an .exe file on a Windows box and get the standard command output returned to the UNIX box.
Of course .exe files are not designed to wait for signals unless they are running so your first problem is to start the executable. Then you have to monitor it waiting for it to complete and then you have to capture its output (from stdout I assume).

So the first thing you need is something like SFU to allow you to run a remote execuable.


The following extract comes from this url http://www.activexperts.com/activmonitor/functions/rsh/
RSH is a client process that opens connections to rsh daemons, sends a command to be executed on the remote server and retrieves its output, both stdout and stderr.
Sounds almost made to order!
Jim Paradies
Post Reply