0
votes

my data set contains 1300000 observations with 56 columns. it is a .csv file and i'm trying to import it by using proc import. after importing i find that only 44 out of 56 columns are imported. i tried increasing the guessing rows but it is not helping. P.S: i'm using sas 9.3

2
What command exactly are you using to do the import? What status/error codes are you getting back?Oliver Matthews

2 Answers

1
votes

If (and only in that case as far as I am aware) you specify the file to load in a filename statement, you have to set the option lrecl to a value that is large enough.

If you don't, the default is only 256. Ergo, if your csv has lines longer than 256, he will not read the full line.

See this link for more information (just search for lrecl): https://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000308090.htm

0
votes

If you have SAS Enterprise Guide (I think it's now included with all desktop licenses) try out the import wizard. It's excellent. And it will generate code you can reuse with a little editing.

It will take a while to run because it will read your entire file before writing the import logic.