cancel
Showing results for 
Search instead for 
Did you mean: 

Execute a batch job using BODS

mohan_salla
Participant
0 Kudos

Hello Experts,

Could you please advise me on below:

I've a batch file that executes successfully from machine(manually).

Now i want to run that batch file through BODS.

I've written the code like

exec('C:\test.bat',' ',0).

It's throwing an error that '5812 4100 RUN-050306 05/10/2011 12:36:50 Function <exec> failed to execute program <C:\SAM\bat_script\callwinscp.bat>. Program terminated with exit code <1>.

Thanks

Mohan

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Mohan,

You could try calling with the option 8 i.e. exec('C:\test.bat',' ',8) which might give you a better error message.

Regards

Dan

mohan_salla
Participant
0 Kudos

Hi Dan,

Thank you very much for your help.

I tried this already but it didn't give any error message.

Info: I'm executing this job from my BODS server.

Please advise me.

Thanks

former_member182007
Active Contributor
0 Kudos

Can you give it a try to execute from management console. sometimes weired issue may occur.

thx

Deep

mohan_salla
Participant
0 Kudos

Hi Deepak,

Thanks for your suggestion. I tried this already but it didn't help.

Is my syntax correct?

Regards

0 Kudos

Syntax is ok, but try calling cmd instead

exec('cmd', 'C:\test.bat', 😎

mohan_salla
Participant
0 Kudos

Hi Deepak,

Thanks for your advise. I've already tried this.

Any other tips?

Thanks

former_member182007
Active Contributor
0 Kudos

Mohan,

Can you check with your DB/Admin/Basis guy regarding any server lock. or try run some other job to confirm it.

thx

Deep

mohan_salla
Participant
0 Kudos

Thanks for your suggestions.

Yes, I did already, There is no server lock because It was run successfully when I run that batch file manually.

I had executing some other bat files from DS in earlier and those went successfully. This is looking funny this time

Mohan

former_member182007
Active Contributor
0 Kudos

Is it possible for you to look at some log. like log when job went succesful and now ?. hope it can give you some fair idea.

thx

Deep

mohan_salla
Participant
0 Kudos

I found a problem. My job is failing because of Host key. I requested my provider to send that Host key.

Thanks for your help guys.