Execute Command Activity Error

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
reddy82
Participant
Posts: 29
Joined: Wed Feb 21, 2007 3:40 am
Location: mumbai
Contact:

Execute Command Activity Error

Post by reddy82 »

Hi,

We are using the Execute Command Activity in the sequence. The activity copy the files from one path to another path

If the files not exists in the path.. it shows the warning as
"Controller problem: Unhandled failure (1) encountered executing command cp"

Now my question is:

If the files exists in the path
then process
else we need to write a specific return code(Eg:'xxxx') not the default error message(Unhandled failure )

your help is much appreciated.


Thanks,
Reddy
Reddy
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

Use Exit 1
Srinu Gadipudi
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

Try with,Command at command activity as follows.

cp /InputPath/File* /OutputPath/File* 2>/dev/null
Cheers
Ravi K
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do an exact search here for "Controller problem: Unhandled failure", it has been discussed here quite a number of times.
-craig

"You can never have too many knives" -- Logan Nine Fingers
reddy82
Participant
Posts: 29
Joined: Wed Feb 21, 2007 3:40 am
Location: mumbai
Contact:

Post by reddy82 »

Hi,

I ran the job seqn with the above mention command.

this is the command we are using the seqn:

Command : cp
Parameters : /catalog/somtous/bdq-ext/sources-ext/SE000000* #G_REP_IN# 2>/dev/null;

we are getting the same warnings.files doen n't exists in the i/p path

Error is :

1) Executed: cp /catalog/somtous/bdq-ext/sources-ext/SE000000* /interfaces/0B51/in 2>/dev/null;
Reply=1
Output from command ====>

2) Command cp did not finish OK, reply = '1'

3) Controller problem: Unhandled failure (1) encountered executing command cp

in the third message we want to change as "xxxxx"

Please help
Reddy
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

To rid of the warning you need uncheck "Log warnings after activities that finish with status other that OK" at Sequencer properties.

After,to write custome messages take Nested condition check if the return value from the command activity is "1" then put one more command activity and use echo command to write your custome message.

This is one workaround.
Cheers
Ravi K
reddy82
Participant
Posts: 29
Joined: Wed Feb 21, 2007 3:40 am
Location: mumbai
Contact:

Post by reddy82 »

After adding the execute command activity

iam getting the error like this:

Controller problem: Unhandled failure (127) encountered executing command Echo 'xxxxxx'

i need to remove the 'Controller problem: Unhandled failure (127) encountered executing command Echo' also


please help
Reddy
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

I think you are using "Echo" instead of "echo". Try to use "echo"
Cheers
Ravi K
Post Reply