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!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.