BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yeaforme
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
yeaforme
Calcite | Level 5

Nevermind, solved it.  I was correct in my hunch.  Increasing lrecl to a much higher number fixed the problem.

View solution in original post

1 REPLY 1
yeaforme
Calcite | Level 5

Nevermind, solved it.  I was correct in my hunch.  Increasing lrecl to a much higher number fixed the problem.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 1 reply
  • 615 views
  • 0 likes
  • 1 in conversation