BookmarkSubscribeRSS Feed
SimoneBraun
Calcite | Level 5

import of csv file - is there a limit regarding the number of variables, observation, or size of csv file, that can be imported into SAS? 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

I don't think there are limits, or at least, I have never run into them.

 

Please be specific, how big is your CSV file, and what happens when you try to import it? 

--
Paige Miller
SimoneBraun
Calcite | Level 5
Thank you, Paige, for your quick response. We haven't got specifics yet, just expecing a huge study data file. I'll get back to you as soon as I know more.
Kind regards,
Simone
Tom
Super User Tom
Super User

@SimoneBraun wrote:

import of csv file - is there a limit regarding the number of variables, observation, or size of csv file, that can be imported into SAS? 


There should not be any limits on READING data from a CSV file. (Other than the storage limits on the machine where SAS is running).  But I would be wary of using PROC IMPORT to GUESS how to read the file.  Write your own data step to read the file based on the definitions of the variables that you have been provided by the creator of the file.

 

In particular PROC IMPORT will not be able to guess the variable names for a file with a header line that is longer than 32K bytes.

 

If you do need a tool for guessing how to read the CSV file you could use this macro:  https://github.com/sasutils/macros/blob/master/csv2ds.sas

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 669 views
  • 0 likes
  • 3 in conversation