This error seems to occur when the file is in a format not expected by SAS, specifically, the TERMSTR (end of line) character is not what's expected.
Take a look at the TERMSTR options that you can add to your filename/file statement to import the file correctly:
options are (CRLF/LF/CR). You can examine your file in a text editor to see which end of line character is being used.
See in the log output: Unable to sample external file, no data in first 5 records.
What does your file look like? Are there a few blank rows? If so, try the DATAROW= option.
There aren't any blank rows.
Usually that means somethings wrong with your file.
What type of error do you get if you directly reference the file?
Also, the path is case sensitive, so if it's lowbwt that's different than LOWBWT.
PROC IMPORT DATAFILE='/folders/myfolders/sasuser.v94/LOWBWT.csv'
DBMS=CSV
OUT=WEBWORK.IMPORT;
GETNAMES=YES;
RUN;
THe file is Named LOWBWT, so that's probably nto the issue in naming. Aslo, with a direct reference I'm getting the same exact error.
This error seems to occur when the file is in a format not expected by SAS, specifically, the TERMSTR (end of line) character is not what's expected.
Take a look at the TERMSTR options that you can add to your filename/file statement to import the file correctly:
options are (CRLF/LF/CR). You can examine your file in a text editor to see which end of line character is being used.
I'm using a mac, so I had to add termstr=cr. Thank you for your help!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.