First look at the file on the source system and see what it looks like. For example if you SAS then you can run a simple program like this to see what is in the first 500 bytes of the file.
data _null_;
infile "&path\sample_import_file.txt" lrecl=100 recfm=f obs=5 ;
input;
list;
run;
The file you posted has CR+LF at the end of each line. It also says that it is using UTF16 character encoding.
NOTE: A byte-order mark in the file "c:\downloads\sample_import_file.txt" (for
fileref "#LN00079") indicates that the data is encoded in "utf-16le". This encoding will be
used to process the file.
You might want to tell the FTP engine that information as it might not be able to autodetect that. I am not sure the FTP engine can detect the BOM the same way that SAS can when reading directly from a disk file.
Second check what your "drag and drop" method actually did. How do you drag and drop a file from Windows to Unix? Are you using some type of GUI FTP interface? if so then perhaps it transferred the file in ASCII mode and so converted the CR+LF to just LF. Or perhaps you have mounted the same physical disk onto both a Windows machine and a Unix machine. Then most likely the file was copied as BINARY and so the CR+LF stayed exactly as they were before.
Third try using the RCMD option on the FTP filename engine to tell your FTP server whether you want to move the file as BINARY. You might need to save it to a temporary physical file and then read from there.
... View more