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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 656 views
  • 0 likes
  • 2 in conversation