Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: forvalues question


From   [email protected]
To   [email protected]
Subject   Re: st: forvalues question
Date   Tue, 22 Apr 2003 16:35:00 -0500

> since you set the delimiter to ";" you have to put one
> after the opening "{". as you can see in the log file
> stata thinks the line end is after replace.

Adding the ; did not fix the problem.

My log file now looks like this ...

delimiter now ;
. forvalues Y = 84 86 {;
  2. log using make`Y'.log, text replace;
  3. global yr `Y';
  4. do read`Y';
  5. do lbl`Y';
  6. do common;
  7. gen index=_n;
  8. label var index "Record number";
  9. gen int panelyr=1900 + `Y';
 10. replace panelyr=2000 + `Y' if `Y'<=3;
 11. label var panelyr "SIPP Survey Year";
 12. compress;
 13. aorder;
 14. order panelyr wave index;
 15.  save sipp`Y'.dta,replace;
 16. do month;
 17. save sipp`Y'm.dta,replace;
 18. log close;
 19. };
invalid syntax
r(198);

end of do-file
r(198);


Regards,

--Alex Cavallo
Lexecon
(312) 322-0208  voice
(312) 322-0218  fax


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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