Statalist


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

Re: st: Issue with log file


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: Issue with log file
Date   Fri, 9 Jan 2009 16:19:40 -0500

Sometimes however there are reasons to prefer txt format, e.g. if you
need to process the resulting log files, then having no smcl tags
there really helps.
A recent example would be recent Jeph Herring's code in "saving local
macros" thread (before it switched to other topics..).

The answer to Tu Nguyen is look at your file extension program
associations. If log files are associated with SAS then either
associate them with Stata, or use a different extension. You may use
any extension you find convenient, e.g. stata_log, log_file, slf (for
StataLogFile), etc, it need not be 3 letters long anymore. You can
configure Windows to hide file extensions if you don't want to see
them: http://windowshelp.microsoft.com/Windows/en-us/help/a0b4607a-6fa8-42ab-aef6-7418183389da1033.mspx

Also note the difference between the smcl extension and smcl file type.

log using filename.smcl, text      creates a text file (no tags) with
an extension smcl
log using filename.txt, smcl        creates an smcl-formatted log
(with tags) with an extension txt
be sure to read the help log for other cases, e.g. I don't like the
policy of "adding appropriate extension" in this case.

Best regards,
   Sergiy Radyakin


On Fri, Jan 9, 2009 at 3:42 PM, Martin Weiss <[email protected]> wrote:
> As Nick said, you never really want to tie your hands by logging as .txt,
> because Stata can -translate- its .smcl log to txt afterwards as in
>
> *********
> log using mylog, name(newlog)
> sysuse auto, clear
> reg p w r
> log close newlog
> translate mylog.smcl mylog.txt
> !start mylog.txt
> *********
>
> HTH
> Martin
> _______________________
> ----- Original Message ----- From: "Friedrich Huebler" <[email protected]>
> To: <[email protected]>
> Sent: Friday, January 09, 2009 9:25 PM
> Subject: Re: st: Issue with log file
>
>
>> Tu,
>>
>> Use the extension "txt" when you specify the name of the log file and
>> add the -text- option.
>>
>> . log using filename.txt, text
>>
>> Friedrich
>>
>> On Fri, Jan 9, 2009 at 1:59 PM, Tu Nguyen <[email protected]> wrote:
>>>
>>> Hello,
>>>
>>> Could anyone please help me resolve this issue:
>>>
>>> In STATA when I try to create a log file using the command -- log using
>>> filename.log -- a SAS log file is automatically created (I have both SAS and
>>> STATA installed in my computer). In brief, it seems that only a smcl log
>>> file could be created in STATA, but not a text log file.
>>>
>>> What should I do to fix this problem?
>>>
>>> Thank you,
>>> Tu Nguyen
>>
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index