[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Creating space delimited ASCII data files

From   Svend Juul <SJ@SOCI.AU.DK>
Subject   Re: st: Creating space delimited ASCII data files
Date   Mon, 10 Mar 2008 09:09:37 +0100

Barth wrote:
I have tried using the outfile command in Stata 9.2 to create a space
delimited, fixed format ascii data file using data from an existing
data file. I received an error message that the name of the ASCII file I
specified (outfile using <file name>) did not exist. Despite this
message, I
did find the generated file on my computer. However, when I opened the
the information was unintelligible (perhaps it was in raw format?).
used the wide and nolabel options). Can anyone tell me how to get a
ascii fixed format file using the outfile or similar command?
- and later:

This is the syntax I used:

   outfile using "C:\Documents and Settings\...\data.txt", nolabel wide

When I executed this command a second time, I did not get an error
However, the resulting text file when opened does not appear to be an
file in fixed column format (it appears instead to either be in Stata
file format or in raw format).


I suspect that the first error message about nonexistence of the file
were going to create was not an error message, but an information due to
- I guess - that you had included a -replace- option in the command. Did
Showing EXACTLY what you typed and EXACTLY what Stata responded is
when seeking advice. What else?

When the file does not exist on the disk, Stata informs you about this: 
the -replace- option was unnecessary. This also explains why you did not

get the message the second time; now the file did exist on the hard

What Stata calls -raw- files are ASCII files. Such files can be opened
inspected by any text editor, e.g. NotePad, or word processor, e.g.
You don't tell which program you used to open the file. Tell us!



Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone:  +45 8942 6090
Home:   +45 8693 7796

*   For searches and help try:

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