On Wed, Sep 2, 2009 at 4:57 PM, John LeBlanc<[email protected]> wrote:
> 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
I am afraid it is not possible. And we are quite lucky that in this case Stata
reports in which record there was a problem. When it comes to errors in .ado
programs, it only tells you the error code, but not the line number.
At least basic error reporting in relation to the source code is
highly desirable
and would make debugging .ado files a much more pleasant task, ultimately
improving the quality of the code. See, how it was done in TurboPascal in the
1980s:
http://ugweb.cs.ualberta.ca/~roman/tutorials/History/F2000WinNT4/Pascal/editing.html
Best, Sergiy Radyakin
> 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: [email protected]
>
> 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/
>
*
* 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/