Statalist


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

Re: st: AW: maximum number of characters in do file


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: maximum number of characters in do file
Date   Wed, 25 Mar 2009 23:48:46 -0400

Dear Rodrigo and All,

A)
may I ask what is the reason to put so much info in the .do file in
the first place?
If this is data, and it is coming from Excel, why not save it as an
ASCII file and merge to your dataset?
Mixing code and data is not always a good idea for several reasons,
which may or may not apply in your case:
1. portability of code (what would a researcher do if she needs to
replicate your computations in SPSS? retype the whole program? or just
one command which imports/merges data?)
2. changes in data (what happens if the care provider's data needs to
be actualized some time later? changing program has a risk of
introducing mistakes, etc)
3. program is hard to read and understand (and particularly to print
if that matters) if the flow of code is interrupted by data generating
procedures.
etc.

To be fare, sometimes one does want the program and data to be in the
single file, when there is a risk of separation between them, which
can make both data and code useless, or when it is known that none
will be modified later. A single file is generally easier to
keep/archive logistically.

B)
While there is a significant bias in this list to create FAQ bullets
from questions like this, and directing the answer-seeking researchers
to them every couple of weeks, the problem can be solved by simply
modifying the error message to be helpful, which is not to say
"something is impossible to do", but "this is the way how you should
do the thing you want". E.g. in this case the error message could have
contained the text saying that "Stata program itself can execute
longer .do files, and it is only a limitation of the do-files editor,
this limitation also applies to the older version of the Notepad.exe
(standard Windows text editor) but other editors don't have this
limitations and can be used to edit do files externally without loss
of functionality".

Perhaps the most radical feature of Visual Studio where I have
recently switched for my programming is that users can easily
contribute into the help shown for any procedure, error message,
visual component or whatever topic. Moreover it is not the user's
responsibility to submit their contributions to Microsoft, since
external sites and blogs are indexed as well, and show up in the
search while Microsoft keeps the authority for maintaining the
official documentation. I have no idea how it is implemented, but it
works.

Would be nice to have Stata provide a possibility for the community to
maintain a "commented version" of the official help, again, explaining
"what to do next? how do I make it work?", rather than "what went
wrong?".
E.g. suppose you get an error 671 "unknown network protocol", what
would be the next step, besides calling the tech-support?
[if you answered "Google it!" or "GOOGLE IT!!!" try to google it and
see if anything beyond this page turns up in the results].

Sincerely,
  Sergiy Radyakin

PS: not to hijack the thread, but out of pure curiosity: if some
experienced Google-searchers can actually find the list of what Stata
considers "known protocols", I would appreciate getting a link to it.



On Tue, Mar 24, 2009 at 10:12 PM, Friedrich Huebler <fhuebler@gmail.com> wrote:
> Many thanks to Martin for mentioning my guide to integrating Stata and
> external text editors. Anyone interested should bookmark the permanent
> huebler.info URL or the alternative blogspot.com URL.
>
> http://huebler.info/2008/20080427-stata.html
> http://huebler.blogspot.com/2008/04/stata.html
>
> I am in the process of moving to a different ISP and after I switched
> providers the Verizon URL shown in Martin's message will lead to a
> "page not found" error.
>
> Friedrich
>
> On Tue, Mar 24, 2009 at 5:08 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:
>>
>> Third party software can easily take care of such problems, see
>>
>> http://mysite.verizon.net/huebler/2008/20080427-stata.html
>>
>> and
>>
>> http://fmwww.bc.edu/repec/bocode/t/textEditors.html
>>
>>
>>
>> HTH
>> Martin
>>
>> -----Ursprüngliche Nachricht-----
>> Von: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Rodrigo Briceño
>> Gesendet: Dienstag, 24. März 2009 21:41
>> An: statalist@hsphsun2.harvard.edu
>> Betreff: st: maximum number of characters in do file
>>
>> Dear Stata listers.
>> Background: Stata 9, Windows Vista.
>>
>> I am trying to make a do file that will define the values for 5820
>> health care providers. I did the syntax in excel in order to have the
>> proper format (quotation marks and numbers associated to names), but
>> when I tried to paste into the do file a message appeared informing me
>> that: "You will exceed the maximum number of characters that the
>> do-file editor can hold (131071 bytes) if text is pasted"
>>
>> I looked in google for similar questions to the stata list and some
>> solution provided was to use notepad, but using this I got the error:
>> input too long.
>>
>> I'm hoping that my question is very well written and formulated in
>> order to get a proper response from any of you. Thanks.!
>>
>> --
>> Rodrigo Briceño
>> Economist
>> +506  22-91-12-00 ext. 113   Office
>> +506  22-32-08-30                Fax
>> rjbriceno@gmail.com
>>
>> MSN: jbric98@hotmail.com
>> SKYPE: rbriceno1087
>
> *
> *   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/



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