Page 1 of 1

Executing Unix script from routine...

Posted: Tue May 15, 2007 7:58 am
by meena
Good Morning All,
I wrote a routine to execute UNIX script. As I need the ouptut of the UNIX scirpt, I wrote a new routine instead of using the 'Execute Command' in the sequencer.

Code: Select all

Command="ksh +x" : Arg: "/InputFilesCount.sh"
Call DSExecute("UNIX",Command, Output, SystemReturnCode) 

Ans= Output <1>
This routine compiles but when I am testing it gives an error as bad option.

Thanks in advance,

Posted: Tue May 15, 2007 8:13 am
by DSguru2B
What is Arg in your routine? Is it really Arg or Arg1.
Plus you need a space between ksh +x and your argument.

Code: Select all

Command="ksh +x ":Arg:"/InputFilesCount.sh"

Alternate solution

Posted: Tue May 15, 2007 8:30 am
by smrutiranjannayak
Hi ,

If it is related to running a Shell script (Unix) Then you can do that using ExecSH option too .
If that is permitted then just execute a after/before subroutine
and give execsh option and in value give ur shell script path
( if ur script needs some parameters you can give along with that also .
Try executing this way.........

It will work

cheers :lol:

Posted: Tue May 15, 2007 9:36 am
by meena
Thanks a lot...

The routine is working , the error is because of the space.