Page 1 of 1

Unix Shell Script Causes File to be Truncated

Posted: Thu Oct 05, 2006 4:08 am
by srinagesh
Hi !

I have a unix shell script to basically remove duplicates

Code: Select all

sort -k 1,1 -u /dat/gscg.dat >/dat/gscg.srt
When i run this shell script from Unix box, it works perfectly.

But when I call it from Datastage using a Execute Command stage, the gscg.srt file is always created as a blank file.

Any ideas as to why this is happening?

-Nagesh

Posted: Thu Oct 05, 2006 4:13 am
by ArndW
That is odd. Are you certain you are using absolute paths, particularly for the source file? A common mistake is that the CWD for jobs started through DSExecute is that of the DataStage project directory; if the source isn't found that would explain the empty (but created) output file.

Posted: Thu Oct 05, 2006 6:32 am
by kumar_s
Check the director log for the exact command that been executed from Datastage.