Control-M job fails saying bat file not found

Post Reply
User avatar
sunitha
Nouveau
Nouveau
Posts: 12
Joined: 14 May 2008 12:00

Control-M job fails saying bat file not found

Post by sunitha » 09 Jun 2008 11:13

Hi there,

I have scheduled a job/command on windows(XP) by invoking a .bat file on the test machine with agent as shown below.

I:\TestsPerformance_ControlM\RunPerfTest_Prod_EU.bat

It runs fine but fails sometimes weirdly by searching for a bat file by removing folder separating slashes.

The syslog in control-M EM shows the following message:

***************************************************
+ I:TestsPerformance_ControlMRunPerfTest_Prod_EU.bat
/tmp/ctm/CMD.1015107: I:TestsPerformance_ControlMRunPerfTest_Prod_EU.bat: not found
***************************************************

Has anyone come across this situation? why are the slashes removed.

Any help on this will be greatly appreciated.

Thanks
Sunitha

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 10 Jun 2008 5:36

The command in your posting is proper but different from the command in job definition. As indicated in sysout, the command in job definition does not have a backslash after the drive letter.

User avatar
sunitha
Nouveau
Nouveau
Posts: 12
Joined: 14 May 2008 12:00

Post by sunitha » 10 Jun 2008 5:44

No, The command I specified in job is exactly the same as in my posting. The only thing I did not mention here is I am passing a parameter along with the command as shown below:

I:\TestsPerformance_ControlM\RunPerfTest_Prod_EU.bat "Noon Run"

It runs sometimes and fails sometimes. I am using Control-M version 6.1.03

User avatar
Cartman
Nouveau
Nouveau
Posts: 1
Joined: 10 Jun 2008 12:00

Post by Cartman » 11 Jun 2008 4:26

It seems like the backslashes are discarded. Have you tried using your command between quotationmarks, like this:

"I:\TestsPerformance_ControlM\RunPerfTest_Prod_EU.bat" "Noon Run"

You could also try to use double backslashes. I know in Unix a backslash is used to ignore a special character, ofcourse this is a Windows-job, but maybe it'll work.

User avatar
srinathk
Nouveau
Nouveau
Posts: 11
Joined: 01 May 2008 12:00

Post by srinathk » 11 Jun 2008 5:11

Did you make sure of the NODE ID mapping to windows - this kind of problem happenes when the NODE ID is set up to Unix and the path and script is windows. For windows scripts we prefer to give path as
' \\xyz\xyz ' then the .bat name in the file name tab.

User avatar
sunitha
Nouveau
Nouveau
Posts: 12
Joined: 14 May 2008 12:00

Post by sunitha » 13 Jun 2008 4:45

Thankyou very much for your help. I missed to mention NODE ID for these jobs. Just now scheduled the jobs again by adding NODE ID. I think this time it will work fine.

Also the solution suggested by Cartman to use quotes worked fine for me and the syslog now shows quotes in the log. :P

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 17 Jun 2008 12:18

I:\TestsPerformance_ControlM\RunPerfTest_Prod_EU.bat "Noon Run"
This command can be run as a "commadn" tasktype, but, better, it can be run as "job" tasktype were:
path: I:\TestsPerformance_ControlM
memname\filename: RunPerfTest_Prod_EU.bat
and in the set panel pass the parameter as : PARM1="Noon Run".

And on whitcth agent execute this command?
NODEID field !
If this field is empy the job is submitted to the server machine, but in the log of the job is reported the name of the agent were is submitted ......
;-))))

User avatar
sunitha
Nouveau
Nouveau
Posts: 12
Joined: 14 May 2008 12:00

Post by sunitha » 19 Jun 2008 7:01

Thanks mauriziog, for your fantastic explanation.

Post Reply