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

Re: st: RE: smcl files-txt files

From   "Michael I. Lichter" <>
Subject   Re: st: RE: smcl files-txt files
Date   Thu, 11 Jun 2009 16:19:43 -0400

If you have some smcl-coded text and you cannot or don't want to translate it as suggested by Gary, the more general solution to what Julie suggested is to replace text using a regular expression. In Word 2003, for example, select Edit->Replace ..., enter "\{?@\}" (without the quotes) in the "Find what:" box, click on the "More" button, click the checkbox for "Use wildcards", and then click "Replace All". This replaces everything between pairs of curly brackets, inclusive of the brackets. Of course, if the log file for any reason included curly brackets for something other than smcl, that text would be removed as well.


Julie Trivitt wrote:
I have had to deal with this before.  I found a work around, although I
suspect it is not the quickest or simplest solution.

I would open it in a text editor or Word and then use the find/replace tool.

I would find {smcl} and replace with (nothing)

Then repeat for {txt}, {res}, {sf}, {com}.... all of the nuisance characters
in the file.

Like I said, I sure it's not the most efficient fix, but I was able to get a
cleaner, useful file out of it.

-----Original Message-----
[] On Behalf Of Rodrigo Briceño
Sent: Thursday, June 11, 2009 12:03 PM
Subject: st: smcl files-txt files

Dear Stata Listers. Few days ago I received a log file with a set of
results from a consultant. The file was saved as a txt file, but the
contents of the file are still keeping some SMCL references. This
happened because although the file was saved as txt, it was generated
as a log in SMCL. (For example:
like {smcl}
{com}{sf}{ul off}{txt}{.-}
       log:  {res}C:\data\brooks02.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}26 May 2009, 10:40:39)

The thing is that I tried to open the file in Stata 9.2 with a viewer
and all the results are mixed with this set of symbols and signs. I
tried saving the file as .smcl, but this didn't work. My question to
you is that if it is possible to get rid of the symbols or otherwise
being able to see the log in a nice format.

I don't know which version of Stata the consultant used, what I know
is that locate him is a neverending task.

Thanks for your gently response.

Michael I. Lichter, Ph.D. <>
Research Assistant Professor & NRSA Fellow
UB Department of Family Medicine / Primary Care Research Institute
UB Clinical Center, 462 Grider Street, Buffalo, NY 14215
Office: CC 126 / Phone: 716-898-4751 / FAX: 716-898-3536

*   For searches and help try:

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