Command prompt stage throwing error at run time

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Lovesh_Patni
Premium Member
Premium Member
Posts: 13
Joined: Fri Jun 22, 2007 1:29 am
Location: Perth

Command prompt stage throwing error at run time

Post 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.
Lovesh Patni
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Lovesh_Patni
Premium Member
Premium Member
Posts: 13
Joined: Fri Jun 22, 2007 1:29 am
Location: Perth

Post 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
Lovesh Patni
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mouthou
Participant
Posts: 208
Joined: Sun Jul 04, 2004 11:57 pm

Re: Command prompt stage throwing error at run time

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