BookmarkSubscribeRSS Feed
MariaD
Barite | Level 11

Hi Folks, 

 

I need to transfer .csv files from one Linux Server to other. I define a FILENAME FTP statement and use a infile/file to transfer it. Transfer finish ok but when I verify the file, it loss some bytes of information. For example, some lines are "break" to new lines.

 

Example of original file:

Screen Shot 2020-03-03 at 19.15.48.png

 

Example of file after transfer:

Screen Shot 2020-03-03 at 19.15.55.png

 

This happen in any file, no matter what size is it. I tried adding BINARY on FILENAME statement but the same happens. 

 

Any idea?

2 REPLIES 2
ballardw
Super User

Please show the exact filename statements tried and what you use to transfer the file.

 

If the object is to move one CSV from a server to another I am not quite sure why you are using SAS as a basic FTP command should work fine without getting SAS involved.

 

If you have a data set that you are writing using Filename FTP, that's another story. If so you might want to provide a data step of the data set to show us the contents involved. Or a similar data set without sensitive information that shows the same behavior.

Kurt_Bremser
Super User

Maxim 14: Use the Right Tool. To just copy files between UNIX servers, use sftp from the commandline. sftp transfers files "as is" per default.

Maxim 15: Know Your Playing Field. Read the many manual pages for sftp (and all the other powerful tools that UNIX systems provide).

 

If you need to control the process from SAS, run the command with a filename pipe, but use the right tool.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 795 views
  • 0 likes
  • 3 in conversation