DATA Step, Macro, Functions and more

Exporting a file to a different directory

Reply
Regular Contributor
Posts: 163

Exporting a file to a different directory

I was using FILENAME FTP in UNIX in order to ftp a PDF file and when opening the file in the receiving end I got a message that the PDF could not open because it was not correctly decoded. Here's the code that I use to FTP:

filename pdffile '/dir/data/apdffile.pdf';



filename create ftp '/somewhere/data2/final.pdf'
host=MACHINE
user='me'
pass='pw';



data _null_;
infile pdffile;
input;
file create;

run; Message was edited by: jplarios
SAS Super FREQ
Posts: 8,744

Re: Exporting a file to a different directory

Hi:
You may want to check with Tech Support. I thought that PDF files (at least the ones created with ODS) needed to be FTP'd as binary files. I think there's an FTP option for that.
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000178980.htm#a002503695

cynthia
Super Contributor
Super Contributor
Posts: 3,174

Re: Exporting a file to a different directory

Suggest reviewing SAS FILENAME FTP DOC with focus on binary transfers.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument, this topic/post:

filename ftp binary unix site:sas.com
Regular Contributor
Posts: 163

Re: Exporting a file to a different directory

Thanks Cynthia and ssb!

jp
Ask a Question
Discussion stats
  • 3 replies
  • 135 views
  • 0 likes
  • 3 in conversation