Date: Thu, 25 Oct 2007 07:44:28 -0400
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Organization: Internet News Service
Subject: Re: How to Determine Number of Observations in External TEXT or
CSV file?
anderson115@gmail.com wrote:
> Is there a way to do this without reading in the entire file?
Only if the file has a fixed format layout, in other words, if every line in
the file is the same length.
Otherwise something has to read every line in the file and count the number
of newlines. A plain
INFILE "mydata.txt";
INPUT;
statement will 'read' every line from "mydata.txt". Upto the first 32,767
characters of a line are placed in automatic variable _infile_. Otherwise
nothing else is done with what has been read.
--
Richard A. DeVenezia