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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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