Page 1 of 1

Cannot create the specified file

Posted: Tue Aug 16, 2005 10:10 pm
by Christina Lim
Hallo all,

I encounter a wierd problem from datastage.

I use command stage to get the row count of files in the directory and output to micntm2.cnt

Instead I got the error below:
TWN_Wait_For_MonthlyFile..JobControl (@exeDiskUse): Executed: /usr/bin/wc -l /dwh/ftp/TWN/m*.txt > /dwh/ftp/TWN/micntm2.cnt
Reply=1
Output from command ====>
A file or directory in the path name does not exist.
SH: /dwh/ftp/TWN/micntm2.cnt: 0403-005 Cannot create the specified file.
I tried execute the same unix command from telnet and it worked successfully. I've checked the folder permission and it shouldn't be due to that.

Anyone encountered this before?

Appreciate ur insight .. Thanx

Posted: Tue Aug 16, 2005 11:30 pm
by aesguerra
Hi,

You might want to check the file permission for micntm2.cnt instead of the folder permission.

HTH.

Posted: Wed Aug 17, 2005 1:36 am
by Christina Lim
hallo..

It doesn't relate to micntm2.cnt permission.

I notice it's because of job parameter in the command stage

Working Fine
========
Command : "/usr/bin/wc -l"
Parameter : "/dwh/ftp/TWN/m*.txt > /dwh/ftp/TWN/micntm2.cnt"

Error Aborted
=========
Command : "/usr/bin/wc -l"
Parameter : "/dwh/#pEnv#/TWN/m*.txt > /dwh/#pEnv#/TWN/micntm2.cnt"

Please advice .. Thank you

Posted: Wed Aug 17, 2005 7:57 am
by aesguerra
Christina,

You cannot use DS parameters in unix commands, you can try to define a user-defined environment variable using DS Administrator and substitute that in the parameter.

e.g. "/dwh/$dsenv/..."

cheers!

Christina Lim wrote:hallo..

It doesn't relate to micntm2.cnt permission.

I notice it's because of job parameter in the command stage

Working Fine
========
Command : "/usr/bin/wc -l"
Parameter : "/dwh/ftp/TWN/m*.txt > /dwh/ftp/TWN/micntm2.cnt"

Error Aborted
=========
Command : "/usr/bin/wc -l"
Parameter : "/dwh/#pEnv#/TWN/m*.txt > /dwh/#pEnv#/TWN/micntm2.cnt"

Please advice .. Thank you