DATA Step, Macro, Functions and more

proc import wizard problem...

Posts: 23

proc import wizard problem...


I'm using the import wizard with SAS to import a MS Excel CSV file.  The problem is that SAS imports the entire file as a header with no observations.


For example,

SAS shows a 10 variable dataset with 0 observations:

RSID  FULLNAME  Priv  Date  EMAIL  Ugkdd10  Jason Thomas  DBA  2008


I need SAS to show me a 5 variable dataset with 1 observation:

RSID,           FULLNAME,         Priv,     Date,       EMAIL

Ugkdd10      Jason Thomas      DBA     2008


I couldn't find any documentation of how to do this.  Maybe proc transpose with some other formula?


Do I need to figure out a way to recreate the dataset with SAS code (i.e., SCAN, SUBSTR, etc)?


Any help is very much appreciated.

Super User
Super User
Posts: 7,845

Re: proc import wizard problem...

I bet you are using Excel on a MAC?

Excel is too stupid to understand that Mac's are now using Unix and that text files should use linefeed as the end of line marker and not carriage return.

Either use the SAVE AS feature and pick a different file format that uses the right end of line markers.

Or tell SAS that the end of line marker is CR.

filename mycsv 'filename' termstr=cr;
Posts: 23

Re: proc import wizard problem...

Nah, not a Mac.  Using proc import wizard via Windows PC.

Super User
Posts: 3,765

Re: proc import wizard problem...

Try another FILE SAVE AS CSV making sure you just choose the plain CSV option  and not CSV (MAC).

Super Contributor
Posts: 448

Re: proc import wizard problem...

Make sure you saved the right CSV file. If you save your file as CSV(Macintosh) and try to import it into SAS then you will have the records in a single line.

@Tom You maybe right they maybe saved as Mac files.








Posts: 9,254

Re: proc import wizard problem...

Posted in reply to SuryaKiran


  One possible solution has also been posted here: in your other posting on the same question.


Ask a Question
Discussion stats
  • 5 replies
  • 5 in conversation