Skip to Content
author's profile photo Former Member
Former Member

Issue with exec() command in 4.1

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 24, 2013 at 12:20 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 24, 2013 at 04:39 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      No, this script kicks off another job. Basically, a set of scripts are included in a master job which in turn executes several other jobs. So, the idea is to run one job which will trigger all other jobs.

  • Posted on Dec 27, 2013 at 07:07 PM

    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. 😉

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.