*! 1.0.1 NJC/CFB 28 January 2000 (STB-54: ip29.1) * 1.0.0 NJC/CFB 17 December 1999 program define archdesc version 6.0 local alpha "abcdefghijklmnopqrstuvwxyz_" gettoken what 0 : 0 , parse(" ,") if "`what'" == "," | "`what'" == "using" { local 0 `"`what' `0'"' local what } else { local what = lower("`what'") if !index("`alpha'", substr("`what'", 1, 1)) { error 198 } } syntax [ using/ ] [ , replace noLog ] set more off if `"`using'"' == `""' & "`what'" == "" & "`log'" != "nolog" { local using "ssc-ideas.lst" local default 1 } else local default 0 local logfile : log if "`logfile'" != "" & `"`using'"' != "" { di in bl _n /* */ "Note: log `logfile' suspended for -archdesc-" log close } if `"`using'"' != "" { capture log using `"`using'"', `replace' if _rc { /* exit gracefully on error */ local rc = _rc if "`logfile'" != "" { di in bl _n /* */ "Note: log `logfile' resumed after -archdesc- error" log using `logfile', append } error `rc' } } local done = 0 /* was possible package name or letter specified? */ if "`what'" != "" { local init = substr("`what'",1,1) if length("`what'") > 1 { /* try as package name */ qui net from /* */ http://fmwww.bc.edu/RePEc/bocode/`init' capture qui net describe `what' if _rc == 0 { * it worked net describe `what' local done = 1 } else { di in bl "`what' not found: " _c di in bl "listing packages starting with" _c di in bl " -`init'-" _n } } } if !`done' { di "Net-aware modules in SSC-IDEAS Archive" _c di " as of $S_DATE $S_TIME" _n if "`init'" != "" { /* initial letter */ net from http://fmwww.bc.edu/RePEc/bocode/`init' } else { /* everything */ local i = 1 while `i' < 28 { local c = substr("`alpha'",`i',1) capture net /* */ from http://fmwww.bc.edu/RePEc/bocode/`c' if _rc==0 { net } local i = `i' + 1 } } } if `"`using'"' != "" { log close } if `default' { di "Listing of modules written to ssc-ideas.lst" } if "`logfile'" != "" & `"`using'"' != "" { log using `logfile', append di in bl _n "Note: log `logfile' resumed after -archdesc-" } set more on end