Statalist


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

Re: st: RE: upgrading to v10: do-file won't load


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: upgrading to v10: do-file won't load
Date   Tue, 4 Nov 2008 15:13:08 -0500

OK, well here is what happens in Windows with a large file
(http://www.gutenberg.org/dirs/etext98/2ws2610.txt):

doedit 2ws2610.txt

"Could not open the file 2ws2610.txt because the Do-file Editor may
only contain 131071 bytes." - this is a pop-up error message, which is
probably for some reason does not appear in a Mac version.

I am sure that not only this includes whitespace (spaces, tabs, etc)
but also CR and LF characters. So ideally look at the file size as
reported by OS. The limitation was more severe earlier, at (AFAIK)
32768 bytes. Note that Stata 9 had exactly the same limit.

Given this limit in Stata for Windows, I wonder what is the limit in
other Stata versions? the number 131,071 is nowhere on the -help
limits- page, and thus may be OS dependent, and that's why you see the
file finally loaded, but double-check that it is loaded completely,
and is not truncated.

The error message does not imply that the file may not be executed in
Stata. So perhaps you could continue with an external text editor.
Friedrich Huebler had a page somewhere with a review of text editors
for different OSes.

Sergiy

On Tue, Nov 4, 2008 at 2:51 PM, Michael McCulloch <mm@pinest.org> wrote:
>> What do you mean by "open"?
>
> I mean using Stata's do-file editor to open the existing do-file, as I've
> done before using v9.
>
> In further persevering, I've noticed that shorter do-files can be opened,
> although much more slowly than they would in v9.
>
>> At 3466 lines each line may be no more than 39 characters to fit into
>> the limit of 135600 is this the case?
>
> There are:
>        3466 lines
>        131,261 characters, not counting spaces
>        150,888 characters, counting spaces
>
>
>> Check for unprintable control characters (codes < Ascii 32, and/or
>> Ascii>127) Are there any? Are you relocating from linux to Windows or
>> the other way around?
>
> There are no control characters.
> I'm upgrading from Mac 9.2 to Mac 10.
>
>
>
>> Get the Stata 9 binary from Stata website and try if the do file works
>> in Stata 9.
>
> Yes it does.
>
>>
>> Sergiy
>>
>>
>> On Tue, Nov 4, 2008 at 2:31 PM, Michael McCulloch <mm@pinest.org> wrote:
>>>
>>>  Thanks Sergiy. Stata says nothing; the problem, specifically is that
>>> when I
>>>  attempt to open the do-file, v10 Stata (fully updated) crashes (stops
>>>  running, freezes, won't respond...) There are 3466 lines, so perhaps
>>> even
>>>  approaching the limit of 3500 lines which you cite is the problem?
>>>  Michael
>>>
>>>
>>>
>>>>  So what is the problem then? Cut-and-paste into an open do file (which
>>>>  you say works), then remove extra parts and save from Stata.
>>>>  do files are text files, there is no such thing as "v10 do-file".
>>>>
>>>>  If your .do-file defines a program - mind the limit of 3500 lines,
>>>>  135600 characters in a program.
>>>>  What exactly does not work:
>>>>   do file.do
>>>>   run file.do
>>>>   doedit file.do
>>>>   view file.do
>>>>  ??????????
>>>>
>>>>  It worked with Stata 9.2. Does it work now with Stata 9.2? What does
>>>> Stata
>>>>  say?
>>>>
>>>>  Sergiy
>>>>
>>>>
>>>>  On Tue, Nov 4, 2008 at 2:16 PM, Michael McCulloch <mm@pinest.org>
>>>> wrote:
>>>>>
>>>>>  Thanks Nick, yes it did work with 9.2. The code can also run if I
>>>>>  cut-and-paste into an open v10 do-file. The problem is that I simply
>>>>>  can't
>>>>>  open the do-file from within v10.
>>>>>
>>>>>>  I take it you mean that the _length_ of the do file is the problem. I
>>>>>>  very much doubt it. Did it work with your previous version? I suggest
>>>>>>  working with increasing subsets of the file, or keeping a trace or
>>>>>> log
>>>>>>  if possible.
>>>>>>
>>>>>>  Nick
>>>>>>  n.j.cox@durham.ac.uk.
>>>>>>
>>>>>>  Michael McCulloch
>>>>>>
>>>>>>  I've just upgraded to v10, and a do-file won't load, causing
>>>>>>  Stata to crash. There are ~3,000 lines of code in the do-file; could
>>>>>>  that be the problem?
>>>>>>
>>>>>>  *
>>>>>>  *   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/
>>>>>
>>>>  *
>>>>  *   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/
>>>
>> *
>> *   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/
>
*
*   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