Cannot create the specified file

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
Christina Lim
Participant
Posts: 74
Joined: Tue Sep 30, 2003 4:25 am
Location: Malaysia

Cannot create the specified file

Post 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
aesguerra
Participant
Posts: 32
Joined: Tue Sep 09, 2003 9:45 pm

Post by aesguerra »

Hi,

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

HTH.
Christina Lim
Participant
Posts: 74
Joined: Tue Sep 30, 2003 4:25 am
Location: Malaysia

Post 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
aesguerra
Participant
Posts: 32
Joined: Tue Sep 09, 2003 9:45 pm

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