Unix OS command from a Windows Server

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
jshurak
Participant
Posts: 74
Joined: Mon Jan 09, 2006 12:39 pm

Unix OS command from a Windows Server

Post by jshurak »

We've had a number of shell scripts in places for a few years, but lately they've been giving us lots of heartache. They are controlled by other shell scripts that we have, task runners. The task runners kick off the individual shell scripts, which in turn kick of a pl/sql stored procedure, then create a certain file so the task runner can kick off the next shell script.

I came up with the idea of simply creating the task runner in datastage with a series of stored procedure stages. This should be perfectly fine, except some of the shell scripts also issue some OS commands before they kick off the store procedure. The commands are simple cat commands.

Our DS server is window. Can the command stage contact our unix server and issue these commands.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Research using rsh or ssh to run a command on a remote server. Unix->Unix, Unix->Windoze, Windoze->Windoze, it's all the same. You just need to setup permissions/authority. Then, your command stage can run the DOS/Windoze script which in turns runs the appropriate command using rsh/ssh to connect to the remote server and issue your remote server specific script/commands.

One trick to avoid writing a remote script is to "stack" commands with a semi-colon.

Another trick is to generate a temporary .ksh script on your Windoze machine, scp it to the remote machine, then ssh to the remote machine and run it.
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
Post Reply