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

st: problem in reading a fixed format data


From   "Jiang, Tao" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: problem in reading a fixed format data
Date   Wed, 13 Nov 2002 13:47:30 -0500

Hi,

I have a data set (say, foo.txt) in fixed format, several observations as:

-10369-13830
 -1766   944
  7732  6551
  6941  3474
  1164 -3143
  -272  6880

I wrote a dictionary file as:
infile dictionary using foo.txt  {  
  _column(1) v1 %6.4f                                             
  _column(7) v2 %6.4f
}

when I use infile to input the data via the dictionary file, there is one
error as: '.-272' cannot be read as a number for v1[6].

In SAS, I can read into the data without problem, where -272 is translated
as -.0272.  

Is there any way in stata to do the same?

Thanks!
                                          
*
*   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