Statalist


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

st: Importing data with infile: Identifying records with problems


From   John LeBlanc <leblancj@dal.ca>
To   STATA Listserv <statalist@hsphsun2.harvard.edu>
Subject   st: Importing data with infile: Identifying records with problems
Date   Wed, 02 Sep 2009 17:57:26 -0300

Hi,

Is there any way that Infile can report a specific part of a record when there is an error as opposed to a record number? I am importing dozens of scanned files and getting hundreds of lines like the following:

'*' cannot be read as a number for tfake[153]
'*' cannot be read as a number for corl[157]

It would be much easier for me to deal with these if instead of the record number, e.g., 153, I could somehow instruct stata to report the first six characters of the record with the problem since those characters represent the research participant's serial number. Also, the record numbers start at one for every text file that is imported and it therefore becomes quite a headache to manage both a relative record number and file identifier.

Thanks for any advice.

--

Regards, John LeBlanc

_________________________________________________________



John C. LeBlanc, MD, MSc, FRCPC
Associate Professor

Pediatrics, Psychiatry, Community Health and Epidemiology

Dalhousie University



IWK Health Centre              Work phone: (902) 470-8930

5850 University Avenue         Work fax:   (902) 470-6913

Halifax, Nova Scotia           Email: John.LeBlanc@Dal.Ca

B3K 6R8 CANADA                 Pager: (902) 470-8888

________________________________________________________________




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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