Hi,
Can anyone help me in writing a script in BODS.
Requirement is like:
Please help me as I am new to BODS.
Regards,
Anurag.
Request clarification before answering.
Hi Naha anurag,
We have new functions added in BODS 4.2
1. file_copy
2. file_move
you can move files using any of the above functions.
or you can also use the above logic posted by madhusudhan.
please refer the below link for more information on file_copy and file_move functions.
http://help.sap.com/businessobject/product_guides/sbods42/en/ds_42_reference_en.pdf
Thanks,
Ravi Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, check out section 2.3.12 File location object in the SAP Data Services Reference Guide (url as given before). The function you need is actually called copy_from_remote_system:
copy_from_remote_system(“flo_ftp_1”, “prod.txt”)
This function uses the FTP information in the file location object flo_ftp_1 to copy the file named prod.txt that is located in a remote directory.
Here's a sample script which I had written..
@echo off
set USER=user_name
set "PASSWORD=password"
set LOCAL_DIR=D:\Data\Proj\Source
set FILE_NAME=filename.txt
set dt=%date:~7,2%-%date:~4,2%-%date:~10,4%_%time:~0,2%_%time:~3,2%_%time:~6,2%
del D:\Data\Proj\ftpcommand.txt
echo USER %USER%>>D:\Data\Proj\ftpcommand.txt
echo %PASSWORD%>>D:\Data\Proj\ftpcommand.txt
echo lcd D:\Data\Proj\Source>>D:\Data\Proj\ftpcommand.txt
echo CD /FTP_Folder>>D:\Data\Proj\ftpcommand.txt
echo ascii>>D:\Data\Proj\ftpcommand.txt
echo MGET filename.txt>>D:\Data\Proj\ftpcommand.txt
echo disconnect>>D:\Data\Delfi\ftpcommand.txt
echo bye>>D:\Data\Proj\ftpcommand.txt
ftp -n -i -s:D:\Data\Proj\ftpcommand.txt FTP_SERVER_IP
/* Copy File from Source folder to Backup Folder on Job Server */
copy D:\Data\Proj\Source\filename.txt D:\Data\Proj\Backup\filename.txt_%dt%.txt
Dont do a copy paste Use your own logic as per the requirement
Regards
Arun Sasi
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.