on 12-09-2013 4:22 PM
I am having issues with exec() in DS 4.1 The same script works fine in 3.2. Below is the script I am using -
$L_ETL_EXEC_FILE = 'JOB_XXX_ABC';
$L_ETL_FILENAME = GET_ENV ('LINK_DIR') || '\LOG\[$L_ETL_EXEC_FILE]' ;
print($L_ETL_FILENAME);
$L_RETURN_VARCHAR2 = EXEC ('[$L_ETL_FILENAME]', '', 8);
print('JOB_XXX_ABC Execution result: [$L_RETURN_VARCHAR2]');
Basically, this script kicks off another job. But when I run the job with the above script to kick off the other job, its giving error 50307/50616.
In the above EXEC statement, if I use '8', there's no error but this job is not kicking off the other job as it is supposed to. But if I use '1' in the above EXEC statement, its failing with error 50307/50616.
Function <exec> failed to launch program <E:\Program Files (x86)\SAP BusinessObjects\DataServices\LOG\JOB_XXX_ABC>, due to error <50616
Is this a privilege issue? In 3.2, this is all working fine.
In 4.1, we are having this issue. We are migrating the jobs from 3.2 to 4.1
Can someone please help?
If there are spaces in your path, it will teach each subsequent 'word' as an additional argument unless quoted.
I would store that base path as a substitution variable. Then if that path changes, you wont have to update it all over the place ... just in the subst var.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joshua,
This is the code I am using -
$L_ETL_EXEC_FILE = 'JOB_TEST';
$L_ETL_FILENAME = GET_ENV ('DS_COMMON_DIR') || '\LOG\[$L_ETL_EXEC_FILE]' ;
print($L_ETL_FILENAME);
$L_RETURN_VARCHAR2 = EXEC ('[$L_ETL_FILENAME]', '', 1);
print('JOB_LOAD_BHI_REFERENCE_CODE_SET Execution result: [$L_RETURN_VARCHAR2]');
And, the error says it can't find the full path when I run the job with an error 50616 -
C:\ProgramData\SAP BusinessObjects\Data Services\LOG\Job_Name
If I were to use this path as substitution variable, would it help?
Hi Joshua,
Did you mean double quotes around the following? I will be using a variable instead but is this where you wanted the double quotes?
$L_ETL_FILENAME = GET_ENV ('DS_COMMON_DIR') || ''\LOG\[$L_ETL_EXEC_FILE]'' ;
_____________________________________________________________________________________
$L_ETL_EXEC_FILE = 'JOB_TEST';
$L_ETL_FILENAME = GET_ENV ('DS_COMMON_DIR') || '\LOG\[$L_ETL_EXEC_FILE]' ;
print($L_ETL_FILENAME);
$L_RETURN_VARCHAR2 = EXEC ('[$L_ETL_FILENAME]', '', 1);
print('JOB_LOAD_BHI_REFERENCE_CODE_SET Execution result: [$L_RETURN_VARCHAR2]');
you would need to wrap double quotes around the entire path:
$L_ETL_FILENAME = '"' || GET_ENV ('DS_COMMON_DIR') || '\LOG\[$L_ETL_EXEC_FILE]"' ;
if you do a directory listing of just the path... print(exec('cmd','dir "' || GET_ENV ('DS_COMMON_DIR') || '\*.*"',8)); ... it should tell you if thats the problem.
I know that I had issues when they changed the install directory, because they decided to add blanks in the path (for whatever reason) and when you print the stdout its not entirely clear if theres a blank in there as it spans multiple lines in the log. I dont have direct access to the job server so its faster for me to do a dir *.guess than it is to get an answer out of the admin. ;(
You are trying to call a .bat file correct? If thats the case why you need to write a custom script like this?
You could have inserted an exec() in a script after the dataflow.
exec('cmd.exe','E:\Program Files (x86)\SAP BusinessObjects\DataServices\LOG\JOB_XXX_ABC.bat',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,
Is it a same server (4.1) or new installation? If it is same server regenerate the batch file once again and include the file extension as well in the code.
Regards,
Chenna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.