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
SAS Super FREQ
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;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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