unable to import csv file

Reply
New Contributor
Posts: 2

unable to import csv file

Hi

I was unable to import a csv file in sas university edition.

This is what I found in logs:

Please help.

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

57 

58 proc import dbms=csv out=FL_insurance_sample replace

59 datafile="/folders/myfolders/FL_insurance_sample.csv";

60 getnames=yes;

61 run;

NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to

WORK.PARMS.PARMS.SLIST.

Unable to sample external file, no data in first 5 records.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

  real time 5.23 seconds

  cpu time 5.15 seconds

  

62 

63 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

75 

Super User
Super User
Posts: 6,330

Re: unable to import csv file

Sounds like your CSV file is empty.

Try looking at it in the editor.

Or run a simple data step to read it in and dump it to the log.

data _null_;

infile "/folders/myfolders/FL_insurance_sample.csv" ;

input;

put _infile_;

run;

Grand Advisor
Posts: 10,210

Re: unable to import csv file

I think you answer lies here:

Unable to sample external file, no data in first 5 records.

Either the file is completely empty or you have multiple blank lines at the top, a very likely occurrence if saved from Excel or similar with nothing entered in the first rows.

Open the file in just about any spreadsheet or text editor and see 1) how many blank rows there are 2) delete the ones before the data. I would also look at the file with a plain text editor for rows containing nothing but commas which would not be apparent with a spreadsheet.

Ask a Question
Discussion stats
  • 2 replies
  • 510 views
  • 0 likes
  • 3 in conversation