June 01, 2009, 03:55 PM
TomGftp'ing a flat file.
Hi,
I am trying to get data from a flat file created by a flow over to a box outside of the 'IBI
enterprise'. With this in mind, I am not sure how to do this. Should I ftp the file via a
stored procedure or should I use FILEDEF to define the intended target? If neither, what
should be used to accomplish this?
The box that is to house the flat file is on the company's network, but it is just not used
for any data warehouse/reporting functionality.
Any information on this is greatly appreciated.
Thank you.
Tom
June 02, 2009, 09:45 AM
jgelonaI just write a Linux script to ftp the file where I want it to go and then in my code issue:
-UNIX /path/ftp_scipt.sh
June 05, 2009, 10:52 AM
simbaHi:
I have some fexes where I FTP a dump file to a FTP server. I put code in the fex to do this:
FILEDEF CHFTP DISK PUT.FTP
-RUN
-WRITE CHFTP open FTP_servername
-WRITE CHFTP username
-WRITE CHFTP password
-WRITE CHFTP bin
-WRITE CHFTP cd /home/directtv/outbox
-WRITE CHFTP put &FTPDISC
-WRITE CHFTP close
-WRITE CHFTP quit
-RUN
DOS ftp -i -s:PUT.FTP
-RUN
In all of my cases, I save a copy of the report to our WebFOCUS server and FTP a copy for the client. The only downside to this is that the username and password is in the fex. We have not had any issues with this (very few people can get on the server). Another thing you could do is schedule something in ReportCaster -you can set up FTP there and the password isn't shown.
simba
June 09, 2009, 01:02 PM
TomGHi Jgelona,
I incorporated the use of a Linux script to ftp the data and it works like a charm. Thanks for your suggestion.
Simba - thank you too for your suggestion.
Tom