Page 1 of 1

Command prompt stage throwing error at run time

Posted: Sun Oct 17, 2010 11:57 pm
by Lovesh_Patni
Hi,

I'm running a .bat file using command prompt stage.Bat file is executed successfully but job is failing with below error.

Command failed to execute - e:\apps\ascential\Projects\xxx>More? .
Log file is created which contains this message 'e:\apps\ascential\Projects\xxx>More?'

Please let me know what needs to be done to fix it.

Thanks in advance.

Posted: Mon Oct 18, 2010 1:14 am
by ray.wurlod
? is a special character to the DOS shell. Don't use it. The Command stage needs to retain control - starting a background process means that it loses control.

Posted: Mon Oct 18, 2010 8:50 pm
by Lovesh_Patni
Hi Ray,

I haven't used '?' this character anywhere in my job.
In command prompt stage if i select the check box of
'Abort if command fails' the job fails though the script is excected successfully.If i disable the checkbox job too finishes successfully.


Thank you
Kartheek Matoor

Posted: Mon Oct 18, 2010 10:24 pm
by chulett
What does the .bat file return? Anything? I haven't used that exact stage before (never having worked with a Windows based DataStage server) but if it's anything like the Execute Command stage, any kind of a non-zero return is considered a failure.

Posted: Tue Oct 19, 2010 12:16 am
by ray.wurlod
Where do the "?" characters in the error message come from?
Kartheek wrote:Command failed to execute - e:\apps\ascential\Projects\xxx>More? .
Log file is created which contains this message 'e:\apps\ascential\Projects\xxx>More?'

Re: Command prompt stage throwing error at run time

Posted: Tue Oct 19, 2010 3:45 am
by mouthou
The error message seems to convey for some invalid DOS command or a command couldnt run from the prompt like you see
DOS gives ? to get some help for erraneous command like you see below.

C:\Windows\System32>help ?
This command is not supported by the help utility. Try "? /?".

Did you try running the batch file from the DOS prompt first?