Code:
* specify locations of data sets;
*universe;
global abcd "Users/Dropbox/BDD/data/source_a"
global abcd09 "/Users/Dropbox/BDD/data/source_b"
global generated "/Users/Dropbox/BDD/data/generated"
global tempdir "temp"
*****************************************************************************;
*unzip universe data;
if 1==1{; //unzip allabcd and coverto to stata
forvalues year=1980(1)2009{;
display "shell 7z e $abcd/ABCD`year'.zip -y -otemp";
shell 7z e $abcd/ABCD`year'.zip -y -otemp *.CSV *.TXT;
};
forvalues year=94(1)99{;
shell st temp/ABCD`year'.TXT temp/abcd_univ_19`year'.dta /y;
erase temp/ABCD`year'.TXT;
};
shell st temp/ABCD2000.TXT temp/abcd_univ_2000.dta /y;
erase temp/ABCD2000.TXT;
shell st temp/ABCD2001.TXT temp/abcd_univ_2001.dta /y;
erase temp/ABCD2001.TXT;
shell st temp/ABCD2002.CSV temp/abcd_univ_2002.dta /y;
erase temp/ABCD2002.CSV;
forvalues year=2003(1)2009{;
shell st temp/UNIVERSE`year'.CSV temp/abcd_univ_`year'.dta /y;
erase temp/UNIVERSE`year'.CSV;
};
Code:
if 1==1{; //unzip allabcd and coverto to stata
. forvalues year=1980(1)2009{;
program error: code follows on the same line as open brace
r(198);
. display "shell 7z e $abcd/ABCD`year'.zip -y -otemp";
. shell 7z e $abcd/ABCD`year'.zip -y -otemp *.CSV *.TXT;
. };
program error: code follows on the same line as close brace
r(198);
end of do-file
r(198);

Comment