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!
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.