Command activity

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Command activity

Post 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.
somaraju
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your test1.ksh script doesn't have execute permissions for the user attempting to run it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Post 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.
Last edited by somu_june on Fri Jul 25, 2008 12:23 pm, edited 1 time in total.
somaraju
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Post by sud »

Yippie, that is what I do ALWAYS and it will SURELY work.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Post by somu_june »

Hi,

Here is the script



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



Thanks,
Somaraju
somaraju
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Post by sud »

In execute command activity, just define command as "ksh" and pass shell file space 6 as the parameters.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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.
Post Reply