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

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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