Bookmark and Share

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: From: "Marko Ledic" <[email protected]>


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: From: "Marko Ledic" <[email protected]>
Date   Sat, 3 Nov 2012 12:31:06 +0000

One $ sign too many in referring to 'ccyy'p ?

(no left quotation mark evident on this device)

On 3 Nov 2012, at 11:40, [email protected] wrote:

Dear StataList,

After running the code (below) I get an error message
invalid file specification r(198).
Can someone let me know how to properly specify the file?

/**global macros**/
global var_hh hhid own
global var_pp hhid dname
global datasets us04 it04

/**program make data**/
foreach ccyy in $datasets {
use $var_pp using $`ccyy'p,clear
merge m:1 hhid using $`ccyy'h,keepusing($var_hh)
if "`ccyy'" != "us04" {
append using $mydata
}
save $mydata,replace
}
end

Best regards, Marko


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index