Unix Shell Script Causes File to be Truncated

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Unix Shell Script Causes File to be Truncated

Post 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
Simplicity is the ultimate sophistication
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Check the director log for the exact command that been executed from Datastage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply