options nocenter; options notes mlogic mprint symbolgen; ** Run with sas -memsize 0m extract_nmrc_all.sas to use all available memory ; ** Reporting memory requirements; options fullstimer ; ** Telling SAS where to look for macros ; filename sasmac '/homes/web/html/sas/macros'; options mautosource sasautos=(sasmac, '$SASROOT/sasautos'); ** Recording amount of memory on this host ; %put memory %sysfunc(getoption(MemSize)); %hostname; options linesize=70; *options obs=10000; *libname out "~/bulk/cost-reports/hosp/"; libname out "/homes/data/hcris/2552-96"; %start_time; %macro loop (fyear=,lyear=); %do year=&fyear. %to &lyear.; libname y&year. "/home/data/hcris/&year."; %let dataset=nmrc&year.; %let user=; **------------------------------------------------------------------------------------; * * Purpose: Select variables from HCRIS Worksheets and output a flat file . ; * by Jean Roth, 2009-12-01, jroth@nber.org ; * Please report any problems or errors to jroth@nber.org ; * NOTE: This program is distributed under the GNU GPL. See end of ; * this file and http://www.gnu.org/licenses/ for details. ; * * wk_xwalk.sas7bdat is a WKSHT_CD / worksheet label crosswalk. ; * **------------------------------------------------------------------------------------*; ** Adding varname; %t0; data out.&dataset.&user.; set out.hosp_nmrc_rpt&year._long ; length varname $32. ; ; *32-character varname maximum; * *12345678901234567892123456789312; select;