BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
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.)
deleted_user
Not applicable
%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;
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1204 views
  • 0 likes
  • 2 in conversation