Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: {smcl} link problem
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: {smcl} link problem
Date
Thu, 6 Jun 2013 16:07:41 -0400
Dear Matt,
thank you for confirming the issue. The example you provide is
possible for the cases of a static code with a few parameters. In my
case the amount of parameters I want to pass is (in general) large -
variables list that potentially might be 32000*33 bytes.I could create
individual tempfiles for each link, but the tempfile solution would
not work, since the links are given to the user in the output and must
survive the completion of my program, at which point all the tempfiles
are destroyed by Stata. Creating fake tempfiles (unmanaged by Stata)
would create a cleanup chaos. (and it is not guaranteed that I will
have a chance to do a cleanup, since there is no guarantee the user
will actually even click on the link).
Best, Sergiy
On Thu, Jun 6, 2013 at 2:38 PM, Matthew White <[email protected]> wrote:
> Dear Sergiy,
>
> I'm using Stata 12.1, and it seems to me that the limit might be 254 characters:
>
> forvalues i = 1/265 {
> display as res `i'
> local x : display _dup(`i') "x"
> display "{stata `x'}"
> }
>
> I'm not sure where that limit comes from. A workaround might be to put
> the command in a do-file or program, and then have the {stata}
> directive execute the do-file/program rather than the command. For
> example, in -help graph pie-, the "click to run" links don't run the
> actual long commands, but instead run a program that contains the
> commands (-gr_example2-).
>
> Best,
> Matt
>
> On Tue, Jun 4, 2013 at 4:13 PM, Sergiy Radyakin <[email protected]> wrote:
>> Dear All,
>>
>> I don't know which limit from 'help limits' is applicable in this
>> case, but it seems that ~244 is rather a small number here. I would
>> imagine that "# of characters in a command" is more suitable.
>> In the following code snippet the smcl link gets corrupted after the
>> link text becomes too long (in my code the list supplied to the link
>> is list of different variables of course):
>>
>> * * * * * * * * * * * * * * * * * *
>> * * * * * * * * * * * * * * * *
>> mata
>>
>> adjvars=""
>> for(v=1;v<=99;v++) {
>> v
>> adjvars=adjvars+" x12345"
>> printf("{text}Message: {stata " + `"""' + "describe " +
>> adjvars+`"":"'+"INFO"+"}")
>> ""
>> }
>>
>> end
>> * * * * * * * * * * * * * * * * * *
>> * * * * * * * * * * * * * * * *
>> Can somebody please confirm that 244 is indeed an intended and
>> unavoidable limit on such a link size, or is it a bug and is there a
>> workaround?
>>
>> Stata 12/MP/Windows
>>
>> Thank you, Sergiy Radyakin
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
>
>
>
> --
> Matthew White
> Senior Project Associate
> Innovations for Poverty Action
> 101 Whitney Avenue, New Haven, CT 06510 USA
> www.poverty-action.org
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/