Hello everyone,
Looking for help once more. I am working on a large dataset and am using the following code to import data to SAS from CSV files:
filename myCSV "F:\Data Extract - WSDS\Holding Pen Rnd3\&&varName&i.\*.csv";
data EEWSDS.data_rnd3_&&varName&i.(keep=DS_Code Pos &&varName&i.);
infile myCSV dsd missover firstobs=2 eov=skip lrecl=156000;
length amountc DS_Code $8;
input DS_Code $ @;
if skip then skip=0;
else do;
do Pos = 1 to 20000;
input amountc $ @;
if not missing(amountc) then do;
&&varName&i. = input(amountc, $8.);
output;
end;
end;
end;
run;
The problem is that, even though some of the rows in the CSV have tens of thousands of cells of data, for some reason only the first 7429 are imported into SAS. Looking at the code, I have no idea why this might be. Thoughts?
My working theory right now is that I might be limiting the amount of memory (maybe characters?) I allow SAS to read before it stops, but not sure how to rectify the situation if that is the case...
Thanks!
Nevermind, solved it. I was correct in my hunch. Increasing lrecl to a much higher number fixed the problem.
Nevermind, solved it. I was correct in my hunch. Increasing lrecl to a much higher number fixed the problem.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.