BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

Need some help. I'm using the below code to send a file to an FTP server. What I need to do is to send the data TAB delimited. Is this possible?

An alternative, is to export the data to a tab delimited file to my C:\ drive, and then send that file in the FTP transfer? Is this possible, and if so, what is the correct syntax to reference an external file to be sent?


filename CUSTDATA ftp 'PREV_WK_CUST_DATA.csv' cd='/VINData'
host='9999999'
user='xxxxx' pass='xxxxxx'
recfm=s
DEBUG;
run;
ODS LISTING CLOSE;

ODS CSV body=CUSTDATA trantab=ascii;

proc print data=WORK.PREV_WK_CUST_DATA noobs;
run;

ODS CSV CLOSE;
run;
ODS LISTING;
run;
4 REPLIES 4
ChrisHemedinger
Community Manager
Are you asking whether your current program approach will work when run within Enterprise Guide? It should...

Chris
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
deleted_user
Not applicable
no, i know the above works. What i need to do is to create a TAB delimited file OR FTP an file that resides on my C drive. Is this possible, and if so how?
Doc_Duke
Rhodochrosite | Level 12
To create the TAB delimited ODS CSV output requires changing the ODS Template for CSV. You should find instructions here
http://support.sas.com/rnd/base/ods/odsmarkup/index.html
(I've not tried it).

To directly FTP a file requires that you use the 'x' command and use the operating system FTP; the 'x' command is disabled by default in EGuide. Your administrator would have to enable that for you. There are a number of discussions of 'x' elsewhere on this forum.
Cynthia_sas
SAS Super FREQ
Hi:
ODS CSV (in some versions) does have the delimiter= suboption:
[pre]
ods csv file=fileref_out options(delimiter='*' doc="Help");
[/pre]

For more information, see
http://support.sas.com/forums/thread.jspa?threadID=5414

I believe that on Windows systems, the tab character (in hex) is '09'x...so the appropriate ODS CSV statement would be:

[pre]
ods csv file=fileref_out options(delimiter='09'x doc="Help");
[/pre]

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 1591 views
  • 0 likes
  • 4 in conversation