Executing Unix Shell Script

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
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Executing Unix Shell Script

Post by mkeevil »

We are running Oracle 9i on a Solaris 8 box and I was wondering if there is anyway to execute a shell script that is on that remote box?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Look for rsh.
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Post by mkeevil »

DS is running on Windows, can't use rsh right????
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Running RSH on Windows

Post by gsherry1 »

mkeevil wrote:DS is running on Windows, can't use rsh right????
You will be able to use rsh and many other Unix like commands if you install cygwin on your windows installation.
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Post by mkeevil »

Where can I download cygwin and find the documentation for it? Is there a way to do it with Native DS? without installing any other products?
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Post by gsherry1 »

mkeevil wrote:Where can I download cygwin and find the documentation for it? Is there a way to do it with Native DS? without installing any other products?

Cygwin is free, and you can find more information about it here:
http://www.cygwin.com/
I am able to run rsh from a windows cmd prompt, which means you should be able to do it from DataStage on windows platform.

I am not a windows expert, so I am not aware of any other windows method to accomplish the same task.
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Post by mkeevil »

I installed the product to my computer to test it, and it placed an icon on my PC... I can run shell commands when I use the executable that it installed but how do I run them from the dos command line?
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Running rsh from windows command line.

Post by gsherry1 »

mkeevil wrote:I installed the product to my computer to test it, and it placed an icon on my PC... I can run shell commands when I use the executable that it installed but how do I run them from the dos command line?
To execute any windows command from command line, the location of that executable must be in the %PATH% environment variable.

To check if this is so:
1. start cygwin shell and type 'cygpath -w /' This should return the root of the cygwin installation, which is typically "c:\Cygwin" or "c:\Program Files\Cygwin".
2. Check MyComputer->Properties->Advanced->EnvironmentVariables->System Variables->Path value to see if it contains the path returned from step 1 with \bin at end.
3. If not add this path with \bin at end to the path and retry running rsh from command line.
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Post by mkeevil »

The only problem is I dont think this can connect to a secured shell, I am going to try to use openssh. At least this is what our unix admin told me.
Post Reply