Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: help on dealing with a character in a text file


From   "MITRA PINAKI (MAR1PXM)" <[email protected]>
To   <[email protected]>
Subject   RE: st: help on dealing with a character in a text file
Date   Thu, 10 Feb 2005 09:05:17 -0500

Stata does not provide any error, it seems like it finishes reading all the data. But it stops on the line before the character � appears. I was looking for something that can be included in my code so that � can be replaced by y and Stata would read the whole file. I use "EditPad Pro" as text editor and it does not have an option of "convert to ASCII".    

Thanks,
Pinaki


-----Original Message-----
From: Ron�n Conroy [mailto:[email protected]] 
Sent: Thursday, February 10, 2005 7:43 AM
To: [email protected]
Subject: Re: st: help on dealing with a character in a text file

MITRA PINAKI (MAR1PXM) wrote:

> Hello List,
>
>     I have a series of fixed formatted flat files which I read in STATA
>     using infix. Sometimes I get a character � in one of the name/address
>     fields and STATA stops reading the file. In other words, if the
>     character � appears in line 100, STATA only reads till line 99 of the
>     data file. How can I make STATA read the entire file?
>
A good text editor can clean up a file like this. There is usually a 
command called something like "convert to ASCII" which removes dud 
characters.

This one is interesting, though, as Stata is apprently interpreting it 
as an end of file marker. Do you get an error or does Stata seem content 
that it has read all the data there is?

-- 

Ronan M Conroy ([email protected]) 
Senior Lecturer in Biostatistics 
Royal College of Surgeons 
Dublin 2, Ireland 
+353 1 402 2431 (fax 2764) 
-------------------- 
Just say no to drug reps 
http://www.nofreelunch.org/

--------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of The Royal College Of Surgeons in Ireland.

--------------------------------------------------------------------------------------------------------------------


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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