filename pgm "P:\mcdc\acsdocs\read_profile_shells2005.sas"; *---read the profile shells excel spreadsheet downloaded from Bureau web site. We upload the resulting SAS dataset to mcdc where it will be used. jgb, 9-2-06. And 1-4-07 to get file with dp4 included. ---; PROC IMPORT OUT= WORK.temp DATAFILE= "p:\mcdc\acsdocs\prof_stubs.xls" DBMS=EXCEL REPLACE; SHEET="Sheet1$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; proc print data=temp(obs=20); run; data profilevars; length Table_Id $8 Line_Number 3 VarName $10 VarLabel $200; set temp(keep=tableid line stubs); where line gt 0; tableid=lowcase(compress(tableid,'0')); *-- change DP02 to dp2 , removing the zero-; Line_Number=line; Varname=trim(tableid)||'i'||left(put(line,4.)); VarLabel=stubs; keep tableid line_number varname varlabel; run; proc print data=profilevars(obs=40); run; proc sort data=profilevars out=profilevars; by tableid line_number; run; signon mcdc; rsubmit; libname acs '/pub/data/acs2005'; filename pgmout '/pub/data/acs2005/Tools/read_profile_shells2005.sas'; proc upload data=profilevars out=acs.profilevars; proc upload infile=pgm outfile=pgmout; *<---upload this program to Tools lib--; run; endrsubmit;