The SAS Output Delivery System and reporting techniques

Moving Files on FTP Server

Reply
N/A
Posts: 0

Moving Files on FTP Server

I have this task in my project where i am asked to move "csv" files between directories on an FTP server using SAS. I know that "x-commands" will do it but i am not allowed to use these commands since they can harm the system !! therefore i am in need to know if there is another solution which will help me do so.

by the way , SAS is installed on Unix Server.
FTP server is on Novell OS.
SAS Super FREQ
Posts: 8,861

Re: Moving Files on FTP Server

Posted in reply to deleted_user
Hi!
Using FTP or moving files on an FTP server is not related to ODS directly. You can try looking up the FTP access method for the FILENAME statement in the SAS documentation or contacting Tech Support for specific help on this task.
cynthia
(Some people DO use the FILENAME FTP access method to move ODS files, however, the use of this capability does not require ODS and is not limited to ODS.)
N/A
Posts: 0

Re: Moving Files on FTP Server

Posted in reply to deleted_user
%let Ftp_User=usercode;
%let Ftp_Pass=password;
%let Ftp_Host=999.999.999.999; /* Ip Address */

filename FtpFile
ftp "File.csv"
host="&Ftp_Host"
user="&Ftp_User"
pass="&Ftp_Pass";

data _null_;
length lineData $ 256;
set DataInputFile;
file FtpFile LRECL=256;

lineData = strip(Date) || "," || strip(MillCode) || "," || strip(Machine) || ",0," || strip(Product) || ",," ||
strip(actual) || ",MT," || strip(mtd);
put Linedata;
run;
Ask a Question
Discussion stats
  • 2 replies
  • 149 views
  • 0 likes
  • 2 in conversation