It is due to the termstr format of the text file. This macro determined which one the file uses and imports properly for both crlf and lf. %macro initial(file, handle_name, other_filename_options=) ; /* if there is a carriage return at the end, then return 1 (stored in macro variable SYSRC) */ %sysexec head -n 1 "&file" | awk '/\r$/ { exit(1) }' ; %if &SYsrc=1 %then %let termstr=crlf ; %else %let termstr=lf ; filename &handle_name "&file" termstr=&termstr &other_filename_options ; options mprint; %mend ; %initial(file=data1, handle_name=A); proc import DATAFILE=A DBMS=DLM REPLACE OUT=Imported_Data ; DELIMITER='|' ; GUESSINGROWS=32767; run ;
... View more