LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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?
Comments: To: sas-l@uga.edu

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


Back to: Top of message | Previous page | Main SAS-L page