on 05-10-2013 8:18 PM
Hi Folks,
I was trying to call a batch script from Data Services.
The goal was to execute the .bat script residing on BODS server D:/DSS/exec/file_move.bat
Here is the syntax that am using:-
exec( 'D:/DSS/exec/ds_file_move.bat' , $lv_source||' '||$lv_target||' '||$lv_fname, 8 )
I print the return code and it is - " 1: 'd 6? is not recogn "
I am not sure if we need to set on the BODS server and any pre-requisits to be handled before hand to invoke the batch scripts.
Any inputs on this will be really appreciated.
Thanks,
Amarri
Ashwin,
If the job server is a windows machine, assume that it is because its a .bat file, I would start with a script
$foo = exec('cmd', 'echo ' || $lv_source || ' '|| $lv_target || ' ' || $lv_fname, 8);
print( 'the output |' || $foo );
Where $foo is a varchar(2048) or a length enough.
so you can verify the command line parameters pass thru as intended.
The string " 1: 'd 6? is not recogn " is not long enough to hold the entire message.
maybe you could add "@echo on" to the bat file and see the context of the error?
Jim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try
exec( 'D://DSS/exec//ds_file_move.bat' , $lv_source||' '||$lv_target||' '||$lv_fname, 8 )
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashwin,
Have a look in to the below mentioned link:
http://scn.sap.com/message/13741603#13741603
it may help you.
Regards,
Shiva Sahu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.