First of all, hi everybody in the forum. I’ve been following the forum for a few years but I’ve decided to register for share mi little knowledge and ask for help to the DS masters jejeje.
I’ve migrated all my jobs from DS XI 3.2 to DS 4.2 and apparently there’s no problem but when I’ve tested some jobs, I have a strange problem executing a .bat application with a DS script.
The issue is the following:
When I run a job, there is a script calling a .bat application like:
exec ( ‘D:\Business Objects\Ficheros Prueba\eventos\parametros2.bat’, ‘[$entorno] pruebas_test’, 0);
But gives me the error:
Job Trace Log
JOB: Job is terminated due to error <50306>.
Job Log Error
(14.2) 11-11-16 08:32:18 (E) (9824:5432) RUN-050306: |Session PARAMETROS2|Function exec
Function failed to execute program <D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat Calidad
pruebas_test>. Program terminated with exit code <1>.
(14.2) 11-11-16 08:32:18 (E) (9824:5432) RUN-050304: |Session PARAMETROS2
Function call <exec ( D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat, Calidad pruebas_test, 0 ) > failed,
due to error <50306>: <Function failed to execute program <D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat
Calidad pruebas_test>. Program terminated with exit code <1>.>.
(14.2) 11-11-16 08:32:18 (E) (9824:5432) RUN-053008: |Session PARAMETROS2
INFO: The above error occurs in the context <|Session PARAMETROS2|exec(…) Function Body|>.
(14.2) 11-11-16 08:32:18 (E) (9824:5432) RUN-050306: |Session PARAMETROS2|Function exec
Function failed to execute program <D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat Calidad
pruebas_test>. Program terminated with exit code <1>.
Reading forums, I change the script to control the error with:
$ruta = ‘D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat’;
print(’[$ruta]’);
print(exec (’[$ruta]’, ‘[$entorno] pruebas_test’, 8));
And gives me the error:
PRINTFN: D:\Business Objects\Ficheros Pruebas\eventos\parametros2.bat
PRINTFN: 1: ‘D:\Business’ is not recognized as an internal or external command, operable program or batch file.
But now comes the rarity problem, if I run the job in unit D: with the path:
D:\BusinessObjects\FicherosPruebas\eventos… removing the blank spaces, the job runs perfectly.
But if I run the job in unit C: using the path:
C:\Business Objects\Ficheros Pruebas\eventos…
or
C:\BusinessObjects\FicherosPruebas\eventos…
With o without blank spaces, the job also runs perfectly.
So I don’t understand why in unit C: runs perfectly regardless of blank spaces in the path and in unit D: only runs if the path has no blank spaces.
Hope your help because I’m stuck with this problem since two weeks!!!
Thanks guys!!!
Tyulio (BOB member since 2016-11-11)