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 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?


satya1976us (BOB member since 2013-08-30)

Yes, In 4.1 the log folder location has changed. I bet that is the issue.

In 4.1 and above, most config files goes to a new environmental variable called - DS_COMMON_DIR

It is even crazy, this actually goes to C Drive path - C:\ProgramData\SAP BusinessObjects\Data Services by default. Switch DS_COMMON_DIR to the LINK_DIR if you will want the same behavior as prior to 4.1

  1. Turn off all services
  2. Copy/Merge the folders/files in DS_COMMON_DIR into LINK_DIR location
  3. Change the value for Environmental Variable
  4. Restart Services

Please first make sure that you are able to kick off the job from the Job Server’s Command Prompt.

Disclaimer : You should not change this setting !!!

I think there exists an SAP Note for this. I will point you to that note as soon as I find the note number

1840848 - How are DS_COMMON_DIR and DS_USER_DIR variables determined in Windows - Data Services 4.1?


ganeshxp :us: (BOB member since 2008-07-17)

Thanks for all the info, Ganesh. I will try all these steps and let you know.

Is this the SAP note you were talking about or it is a different one? 1840848


satya1976us (BOB member since 2013-08-30)

It is the one I was talking about. I don’t know if there exist an SAP Note on how to change this.


ganeshxp :us: (BOB member since 2008-07-17)

OK. Thanks Ganesh. I appreciate your prompt response. After everything works fine, I will post a reply.


satya1976us (BOB member since 2013-08-30)

Hi Satya,

We are migrating jobs from 3.1 to 4.1

When I am trying to call a powershell script within my BODS script using exec() then it is giving me weird result.

Below is the powershell script which works fine on cmd prompt,

$timestampA=Get-ChildItem \ora\ftp\import\CMFALL_20140306001502.DAT -name
$timestampB=($timestampA).Replace(".DAT"," “)
$timestampC=($timestampB).Replace(“CMFALL_”,” ")
$timestampD=($timestampC).Trim()

so the $timestampD stores “20140306001502”.

But when I call this within the BODS script as below,

$TIME_STAMP=exec(‘cmd’,’/ora/test/oracle/cron/etl/scripts/GetTimeStamp.PS1’, 8 )

this returns me wrong something like " 1: ‘ra’ is not".

can you figure out whats going wrong here.

I would like to check with you 2 things,

  1. whats the use of giving “,8” at the end of the exec() function.

  2. did you found any solution for the exex() bug mentioned by Ganesh in this discussion.


Dvn (BOB member since 2012-11-24)