AfterJob (ExecDOS): Error when executing command

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
cheerfu1
Participant
Posts: 37
Joined: Mon Apr 21, 2003 8:47 pm

AfterJob (ExecDOS): Error when executing command

Post by cheerfu1 »

Hi,

I have a datastage job which calls a DOS command after it finishes processing. I have run it more than 30 times in a day. However, occassionaly, this after-job command does not work. However, when I restart again, it will always work. Any idea? Thanks in advance.

Code: Select all

AfterJob (ExecDOS): Error when executing command: D:\work_path\util\touch G:\work\input\finish.test
*** No output from command ***
solaik
Participant
Posts: 12
Joined: Sun Jan 23, 2005 10:33 pm

Post by solaik »

Hi,

It is not problem with datastage. First execute dos command manually and check whether it is working fine or not.
In our project we faced same error while executing shell script.
yatin.mittal
Participant
Posts: 20
Joined: Fri Oct 14, 2005 12:52 am

Re: AfterJob (ExecDOS): Error when executing command

Post by yatin.mittal »

Hi

The problem may be that when you execute the DOS command, at that time it doesnot execute means there may be some problem in that in the sense the command is creating some error.
As sometimes it works, this shows datastage job is fine.

If you restart, then it works, means then your command get the sufficient resources required and thats why it runs.

So check the things with your Command.

With regard,
Yatin Mittal
cheerfu1 wrote:Hi,

I have a datastage job which calls a DOS command after it finishes processing. I have run it more than 30 times in a day. However, occassionaly, this after-job command does not work. However, when I restart again, it will always work. Any idea? Thanks in advance.

Code: Select all

AfterJob (ExecDOS): Error when executing command: D:\work_path\util\touch G:\work\input\finish.test
*** No output from command ***
Yatin Mittal
Accenture Services Pvt. Ltd.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Inspect the code for ExecDOS in the Routines branch. If the exit status of the command (ERRORLEVEL in DOS terminology) is other than zero, the job will be aborted because the ErrorCode argument will be set to that non-zero value.

You need to determine what the exit status of your command is. Perhaps you can create a custom version of ExecDOS that includes some additional diagnostic messages (you can enable/disable these with conditional compilation techniques - yes, even in version 4.x) and maybe also guarantees that your touch command works.

Were you aware that DataStage on Windows has its own touch command? It's in the DataStage Engine's bin folder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply