Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: Controlling record length in ASCII file imports

From   David Kantor <>
Subject   Re: st: Re: Controlling record length in ASCII file imports
Date   Tue, 10 Aug 2010 10:44:33 -0400

Look for the lrecl() feature in dictionaries.
See -help infile2-.

At 09:44 AM 8/10/2010, you wrote:
I am trying to import raw data from an ASCII file into Stata and am
failing. There should be about 800 observations, but I am importing
only 200 or so. I tried this using infix and writing a dictionary
file. I realized afterwards that the ASCII file is formatted poorly:
the data are not in nice, neat columns and each observation does not
start on a new line (i.e., observation 1 is on line one and
observation 2 begins at the end of observation 1 and perhaps wraps
around to line 2). I'm not quite sure of the most efficient way to
approach this, especially given that I have about 10 of these files
with about 800 observations each. It seems like I could manually put
each observation on a new line, but that would take a while. Is there
a way to specifiy record length? Or another option?

Thanks much,
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index