x cd s:\mscdc\data_tools; %let pgm=salestax; filename pgm "&pgm..sas"; *--Read the salestax excel spreadsheet created by EJC with Missouri sales tax and pop estimates data for 90, 94 and 98. --; *---Last edits made by jgb, 11-8-99 ; *---rerunning conversion 11-8-99 after EJC edits the spreadsheet---; filename attrib 'd:\temp\salestax.attrib.sas'; ods html close; options ls=140 ps=52 nocenter symbolgen; *--landscape mode with sasfont size 8--; title 'Read Missouri Sales Tax Data'; libname temp 'd:\temp'; options nolabel; proc import datafile="s:\evelyn\data\taxable sales.xls" out=temp.salestax replace; sheet="A"; getnames=yes; run; data temp.salestax; set temp.salestax; format _numeric_ ; informat _numeric_ ; format _char_ ; informat _char_ ; rename opo94=pop94; run cancel; *<==================we fixed this in the spreadsheet so do NOT run it-; *genattr(setin=temp.salestax) ;*--attrib stmts below came from output; run; options label; data temp.mosals98(label='Mo Taxable Sales, 90,94,98 (R)'); *--Attribute statement(s) generated by genattr macro--; Attrib slvl length=$3 label='Summary Level' region LENGTH=$2 label='MU Ext Reg' COUNTY LENGTH= $5 AREANAME LENGTH=$40 taxable90 LENGTH= 5 label='Taxable Sales 1990 ($000)' taxable94 LENGTH= 5 label='Taxable Sales 1994 ($000)' taxable98 LENGTH= 5 label='Taxable Sales 1998 ($000)' taxpc90 LENGTH= 4 label='Per Capita Taxable Sales 1990' taxpc94 LENGTH= 4 label='Per Capita Taxable Sales 1994' taxpc98 LENGTH= 4 label='Per Capita Taxable Sales 1998' pchg9094 LENGTH= 4 label='% Chg Taxables Sales, 1990-94' pchg9498 LENGTH= 4 label='% Chg Taxables Sales, 1994-98' pchg9098 LENGTH= 4 label='% Chg Taxables Sales, 1990-98' pop90 LENGTH= 5 pop94 LENGTH= 5 pop98 LENGTH= 5; ; keep slvl--pop98; format taxable90--taxable98 dollar10. taxpc90--taxpc98 dollar7. ; format pchg9094--pchg9098 5.1; set temp.salestax(rename=(county=nco)); if pop90; *--gets rid of non-data lines; if pop90 ne 1990; if areaname='Missouri' then slvl='040'; else do; if nco then do; county=put(nco,z5.); slvl='050'; end; else do; slvl='05X'; *--code for UM Ext Region Summary--; end; end; *---convert taxable sales to thousands of dollars---; array tax taxable90--taxable98; do over tax; tax=round(tax,1000)*.001; end; rename taxable90=taxabl90 taxable94=taxabl94 taxable98=taxabl98; run; proc print label u data=temp.mosals98; title2 'mosals98'; run; proc freq data=temp.mosals98; table slvl region; run; signon oseda; rsubmit; libname mosals v6 '/mscdc/data/mosals'; proc upload data=temp.mosals98 out=mosals.mosals98(label='Mo Taxable Sales Data 1998'); run; proc upload infile=pgm outfile='/mscdc/data/mosals/Tools/cnvt.mosals98.sas'; run; endrsubmit;