Skip to Content
0

How to create BODS Script to execute the file and update using FTP

Dec 20, 2016 at 08:38 AM

47

avatar image

Hi Folks,

We have a requirement to call the FTP by using the script as below:

#OK FILE - CREATION

$START_TIME = to_date(sql('CRM_STAGING','select to_char(sysdate,\'YYYYMMDD\') from dual'),'YYYYMMDD');

$BU_CODE = '[$ASWBUCode]' ;

############## added token file for MBCN once daily etl job completed

if ($BU_CODE='MBCN')

begin

$CURRENT_DATE =SQL('CRM_STAGING','select to_char(sysdate,\'yyyymmdd\') from dual');

$OK_FILE_NAME= 'ORDER_CRMBO_MBCN_'||$CURRENT_DATE||'.OK' ;

$SQL='echo [$OK_FILE_NAME] >> [$OUTBOX_FILE_PATH]\\[$OK_FILE_NAME]'; print($SQL); print(exec('cmd.exe',$SQL));

end

=====================

Created the variables as per the requirement:

$OUTBOX_FILE_PATH = 'D:\\ASW\\CRM\\ftp\\LocalUser\\mbcn\\outbox\\'

Can you please help me to acheive the requirement?

Thanks for your help in advance..

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers