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 (September 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 28 Sep 2009 18:41:04 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: SAS Stops Reading Before End of File...Why?
Comments: To: Paul Choate NOACK REPRO <pchoate@DDS.CA.GOV>

I just wanted to go on record supporting Paul's suggestion. HexMad has been a great free utility. Not only does it do its intended job, but can instantly read large files that notepad and wordpad can't even begin to address.

The only thing it is missing is a greater than 16 char ASCII view, but that isn't its intended function.

Art ------- On Mon, 28 Sep 2009 11:33:32 -0700, Choate, Paul@DDS <pchoate@DDS.CA.GOV> wrote:

>Kevin - a nice little free utility to look for DosEOF type gotchas is >HexMad. > > > > > >SN-003632 >When reading a binary file as text, the SAS System stops reading the >input file after encountering a Ctrl + Z character > >------------------------------------------------------------------------ >-- >If the SAS System encounters a Ctrl+Z or Hex 1a character when reading > a binary file as text, input stops because the character is treated >as > an end-of-file character. There is a new option for Version 8.2, > IgnoreDOSEOF, which will allow these characters to be read. > >The option is used on an infile or filename statement, as in the >following: > > data one; > infile 'c:\myfiles\dosfile.txt' ignoredoseof; > input foo $100.; > run; > > or > > filename angus 'c:\myfiles\dosfile.txt' ignoredoseof; > data one; > infile angus; > input foo $100.; > run; >------------------------------------------------------------------------ >-- > >Paul Choate >DDS Data Extraction >(916) 654-2160 > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of >Kevin Myers >Sent: Monday, September 28, 2009 11:02 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: SAS Stops Reading Before End of File...Why? > >Using SAS 8.2 under Windows XP SP3 with all critical updates, I am >attempting to read about half a dozen very large comma delimited files >that were exported from a proprietary database. Each of the files is >more than 1 GB in size. I am able to read 5 of the six files with no >problems. However, SAS stops reading the sixth file after reading >6595145 records or about 418704 KB (419 MB) out of a file that totals >3430232 KB (3430 MB or 3.4 GB). > >I have tried reading this file alone and on several different computers >with exactly the same results. All of these computers have lots of RAM >and big hard drives with plenty of free disk space. Some of the other >files that are being read successfully have many more records than at >the point where this error occurs. I have deleted and re-created the >problem file from the proprietary database several times on different >machines, again with no different results. In an attempt to debug the >problem, I tried the following extremely simple code: > >data _null_; >infile &inFile lrecl=1024; input; >file &outFile lrecl=1024; put _infile_; >run; > >Even that very basic code stops reading the file at the same point. (By >the way, these files have variable length records, with an actual >maximum length of around 600 bytes.) > >Since these files are essentially text files, the only thing that I can >think of which might be happening is that maybe the problem file >includes a null (hex 00) byte which SAS is interpreting as an end of >file marker. If that is the problem, I don't know how to effectively >work around it using SAS. I can't find any option for the infile >statement that says to ignore nulls and use the actual file size, even >though somewhere in the dark recesses of my brain it seems like I have >heard of such an option previously. > >Does anyone have any better clues as to what might be happening and how >to solve this problem? > >Thanks, >Kevin M.

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