You don't comment on my replacement of 9 lines of code with 1.
Your main loop looks like another -forval- or -foreach- loop but you
don't explain why you want to save different levels in different
datasets.
Nick
On Mon, Dec 31, 2012 at 2:27 PM, Prakash Singh <prakashbhu@gmail.com> wrote:
> Nick sorry but that is type error.
> Thanks for the suggestion anyway.
>
> Moreover I am looking some help on creating look so that I can repeat
> the following code for each level 1 to 9.
>
> clear
> set more off
> set mem 500m
> tempfile mydata
> foreach l of numlist 11/19 {
> infile using D:\TEAM_PC\level`l'.dct, clear
> capture append using `mydata'
> save `mydata', replace
> }
> use `mydata', clear
> keep if level==1
> save level1_list.dta", replace
>
>
*
* 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/