Desktop productivity for business analysts and programmers

FTP help - EG 4.1

Reply
N/A
Posts: 0

FTP help - EG 4.1

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;
Community Manager
Posts: 2,712

Re: FTP help - EG 4.1

Are you asking whether your current program approach will work when run within Enterprise Guide? It should...

Chris
N/A
Posts: 0

Re: FTP help - EG 4.1

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?
Valued Guide
Posts: 2,111

Re: FTP help - EG 4.1

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.
SAS Super FREQ
Posts: 8,721

Re: FTP help - EG 4.1

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
Ask a Question
Discussion stats
  • 4 replies
  • 367 views
  • 0 likes
  • 4 in conversation