Why am I getting an extra double quotes for scheduled job

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
dang
Charter Member
Charter Member
Posts: 5
Joined: Thu Oct 28, 2004 8:58 am

Why am I getting an extra double quotes for scheduled job

Post by dang »

Windows Server 2003 SP2
Datastage 7.5


In a routine activity sequence I have the following command:
"copy " : Char(34) : SOME_PATH : "\DataIn\REGION.CSV " : Char(34) : " " : Char(34) :BASE_PATH : "\data_in\user\REGION.CSV" : Char(34) : " /Y /V"

I have the job scheduled to start on the first of the month, but the actual job may not be run for a day or two due to processing being done before this job can run. When it comes time for the job to run, it usually fails with the following:

SEQ__GETFILES..JobControl (ExecDOS): Error when executing command: copy ""\\hofs1\corpdata$\COMPANY\XXXX-XXXX\YYYY-YYYY Project"\DataIn\REGION.CSV " "D:\ETLData\ETL_Prod\data_in\user\REGION.CSV" /Y /V
*** Output from command was: ***
The system cannot find the path specified.


When I reset the job and restart it manually, it runs fine:
SEQ__GETFILES..JobControl (ExecDOS): Executed command: copy "\\hofs1\corpdata$\COMPANY\XXXX-XXXX\YYYY-YYYY Project\DataIn\REGION.CSV " "D:\ETLData\ETL_Prod\data_in\user\REGION.CSV" /Y /V
*** Output from command was: ***
1 file(s) copied.

Any idea why the sheduled command has added double quotes after the copy command and after the word Project?


Thanks in advance for your suggestions!!
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Re: Why am I getting an extra double quotes for scheduled jo

Post by DeepakCorning »

Are you supplying the file name as a parameter or it is hardcoded in the job?
Thanks
Deepak Patil

Convince Them Confuse Them .. What's the difference?
dang
Charter Member
Charter Member
Posts: 5
Joined: Thu Oct 28, 2004 8:58 am

Post by dang »

The filename is hardcoded "REGION.CSV" The parameters I am passing are SOME_PATH and BASE_PATH
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Dang - just as an aside, you can mix quote characters in DataStage, so your command could read:

Code: Select all

'copy "':SOME_PATH:'\DataIn\REGION.CSV" "':BASE_PATH:'\data_in\user\REGION.CSV" /Y /V'
If you use that, does your error remain the same?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... was going to point that out when I got a chance. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
dang
Charter Member
Charter Member
Posts: 5
Joined: Thu Oct 28, 2004 8:58 am

Post by dang »

Thanks ArndW and chulett. I used that command and it worked fine running manually. Next month will be the test when it runs as a scheduled job. I will mark this as resolved.

Dan
Post Reply