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
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
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
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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