-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog2do.hlp
57 lines (39 loc) · 1.57 KB
/
log2do.hlp
1
.-Help for ^log2do^ Morten Andersen.-Converts Stata log files to Stata do files------------------------------------------ ^logtodo^ logfilename[^, replace^]Description-----------^logtodo^ is made to convert ^log^ files to ^do^ files. It removes commands which ledto errors, retains comments, and handles long lines which were wrapped byStata. The file ^logfilename^ must be a the name of a ^log^ file (without itsextension). The resulting ^do^ file has the same name, but an extension of.do. This command must be run on with an empty data set.Options-------^replace^ must be specified to overwrite and already existing ^do^ file.Examples-------- ^logtodo mylog^ will take the ^log^ file ^mylog.log^, and create the ^do^ file ^mylog.do^. If the file ^mylog.do^ already exists, ^logtodo^ will complain and exit. ^logtodo mylog, replace^ will take the ^log^ file ^mylog.log^, and create the ^do^ file ^mylog.do^. If the file ^mylog.do^ already exists, ^logtodo^ will overwrite it.Notes----- While ^logtodo^ can handle most situations well, clever Stata programmers will beable to create situations where it fails by creating lines in the log filewhich mimic lines which Stata produces. Commands like ^disp ". nonsense"^ or^disp "r(666);"^ or ^disp "> hee hee"^ will all cause logtodo to stumble. What twistedmind would be entering such commands while creating a log file?Author------Bill RisingDepartment of BiostatisticsJohns Hopkins Universitybrising@@jhsph.edu(410) 955-2468