Page 1 of 1

Command activity

Posted: Thu Jul 24, 2008 8:08 am
by somu_june
Hi,

I designed a sequence job using execute command activity and Iam calling the script . In command tab I gave the path of the script and in parameters Iam passing the value but my script is not running when I run the job and it is running fine from command line . Datastage Job is running successfully but it is not executing the script and in log I found


Test_Seq..JobControl (@Execute_Command_0): Executed: /data/dev/dstag/dataset/som/test1.ksh 6
Reply=1
Output from command ====>
SH: /data/dev/dstag/dataset/som/test1.ksh: cannot execute


where 6 is the parameter Iam passing . Iam using Sun solaris

Please can some body help me here


Thanks,
Somaraju.

Posted: Thu Jul 24, 2008 8:19 am
by keshav0307
the script may not be in executable mode.

in unix or linux. it can be
sh /data/dev/dstag/dataset/som/test1.ksh 6

Posted: Thu Jul 24, 2008 8:19 am
by chulett
Your test1.ksh script doesn't have execute permissions for the user attempting to run it.

Posted: Fri Jul 25, 2008 12:18 pm
by somu_june
Hi Guys,

I changed the permission of the script to 777. Now Iam getting warning

/data/dev/dataset/soma/test1.ksh: !/bin/ksh/: not found
/data/dev/dstage/dataset/soma/test1.ksh: orchadmin: not found


ksh test1.sh 6 where 6 is input parameter . Do I need to invoke the shell before it run.


Thanks,
somaraju.

Posted: Fri Jul 25, 2008 12:21 pm
by sud
Yippie, that is what I do ALWAYS and it will SURELY work.

Posted: Fri Jul 25, 2008 12:26 pm
by somu_june
Hi,

Here is the script



#!/bin/ksh/
cd /data/ins/dev/dataset/R1/
orchadmin delete PSRA*_$1.ds



Thanks,
Somaraju

Posted: Fri Jul 25, 2008 12:32 pm
by sud
In execute command activity, just define command as "ksh" and pass shell file space 6 as the parameters.

Posted: Fri Jul 25, 2008 5:53 pm
by keshav0307
i think you need to update the script,
before running orchadmin command, you need to source the dsenv file and then export the varialble APT_CONFIG_FILE.