Help using Base SAS procedures

Import stopping after 7429 observations?

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Import stopping after 7429 observations?

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!


Accepted Solutions
Solution
‎10-26-2013 11:58 PM
Contributor
Posts: 35

Re: Import stopping after 7429 observations?

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

View solution in original post


All Replies
Solution
‎10-26-2013 11:58 PM
Contributor
Posts: 35

Re: Import stopping after 7429 observations?

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 129 views
  • 0 likes
  • 1 in conversation