Statalist


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

AW: st: AW: compare files, vars only


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: AW: compare files, vars only
Date   Thu, 19 Feb 2009 18:06:50 +0100

<> 



See NJC`s http://www.stata-journal.com/article.html?article=pr0045
on this point...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Eva Poen
Gesendet: Donnerstag, 19. Februar 2009 18:03
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: AW: compare files, vars only

2009/2/19 Johannes Geyer <JGeyer@diw.de>:
> owner-statalist@hsphsun2.harvard.edu schrieb am 19/02/2009 17:39:52:
>
>
> But it does save the list of variables in a local macro, if you choose the
> option [varlist] - or am I missing a point? The problem is - as Martin
> suggested - that this local macro is limited to a low number of characters
> (244) which might not be enough in many occasions.
>

Johannes,

the limit (244) only hits you in an expression. As long as you avoid
the equal sign, you should be fine.
See this example:

***************************************
clear
forvalues x=1/250 {
   gen var`x' = .
}
save test

clear
qui des using test, varlist
loc first `r(varlist)'
local second = r(varlist)

local n : length local first
local m : length local second
di "No equal sign: `n'   With equal sign: `m'"
*****************************************

Eva
*
*   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