Page 2 of 2

Posted: Mon Apr 20, 2009 8:32 am
by ShaneMuir
Not sure if its the same thing (as my one was in Parallel and on unix), but when I was trying to execute commands it kept trying to look in the root directory rather than in the parameterised file directory and file pattern. It was only when I placed the parameters in single quotes that it recognised the path.

Posted: Mon Apr 20, 2009 9:00 am
by chulett
Probably not, as we're talking specifically about the Execute Command stage in a Sequence job, so... ah... hmm...

You may very well need quotes here because of the 'long filename' you are using, specifically the directory name with the spaces in it. So sometimes you need to put single quotes around the entire path so the spaces don't confuse it, or switch it to the original recipe DOS 8.3 short name, which is probably "datato~1". Either that or (if possible) rename any subdirectories so they don't have spaces in them. As a test at the very least.

Still, doesn't really explain why it works hard-coded. :?

Posted: Mon Apr 20, 2009 9:22 am
by ShaneMuir
chulett wrote:Probably not, as we're talking specifically about the Execute Command stage in a Sequence job, so... ah... hmm...
...
Actually so am I, I use an execute command stage to call a unix script to which I pass several parameters. All the other parameters worked fine it was only the file pattern that had an issue. As soon as I used *.csv it started looking in the root directory but if I passed '*.csv' it worked fine. (or rather i passed '#File_Pattern#')

Posted: Mon Apr 20, 2009 10:07 am
by chulett
Ah... you mentioned 'Parallel' which I assumed meant something other than a Sequence job.

Posted: Tue Apr 21, 2009 2:42 am
by BIuser
Thanks for the replies - I'm going to give the single quotes a try and then I'll post what happens ... after that I'll do what Craig suggested and run it with the hard-coded values and post the log details.

thanks guys !

Posted: Tue Apr 21, 2009 4:44 am
by BIuser
Success !

So much brainpower - so little time !

Thanks a mil.

Barbara

Posted: Tue Apr 21, 2009 7:10 am
by chulett
So, Barbara... for completeness, what actually resolved it for you? The single quotes? Did any of the other suggestions work as well, out of curiousity?

Posted: Fri May 01, 2009 1:37 pm
by campbellj2
We use Parameters in Dos commands all of the time. However we use the ExecDOS Routine. The routine is found in the Built-in\Before/After folder .

Enter your DOS command as follows

"COPY /Y " FILEPATH : FILENAME " C:\TEMP\X.DAT"

Wrap the DOS part of the command in double quotes. Use the colon: to append the statement together and use the parameters without the pound signs. After the job runs, check your log in Director to see the command syntax that was built. This will work for you.