Prev: Predictive Analytics World Announces October 2010 Conference
Next: SPSS files quadrupling in size when imported to SAS
From: JGE023 on 17 Jun 2010 14:26 How can I use an Excel spreadsheet instead of my proc format? I would like the user to make update to table adding accpet codes if needed. example of excel sheet called MDD: fmtname type value label MDDFMT c 11 accept MDDFMT c 32 accept MDDFMT c 53 accept MDDFMT c 54 accept MDDFMT c 65 accept MDDFMT c other decline Proc Format value $MDD '11','32','53','54','65' = 'accept'; other = 'decline'; data temp; set allclients; MDDFlag = 0; ************************************************; MDDVal=input(put(MDD,$MDD.),$7.); IF MDDVal EQ 'accept' then do; MDDFlag = 1; End;
From: data _null_; on 17 Jun 2010 16:05
On Jun 17, 1:26 pm, JGE023 <j...(a)cdc.gov> wrote: > How can I use an Excel spreadsheet instead of my proc format? I would > like the user to make update to table adding accpet codes if needed. > > example of excel sheet called MDD: > > fmtname type value label > MDDFMT c 11 accept > MDDFMT c 32 accept > MDDFMT c 53 accept > MDDFMT c 54 accept > MDDFMT c 65 accept > MDDFMT c other decline > > Proc Format > value $MDD '11','32','53','54','65' = 'accept'; > other = 'decline'; > > data temp; > set allclients; > > MDDFlag = 0; > > ************************************************; > MDDVal=input(put(MDD,$MDD.),$7.); > > IF MDDVal EQ 'accept' then do; > MDDFlag = 1; > End; Use SAS to read the data from EXCEL (several options there). Then create a PROC FORMAT CONTROL data to create the format $MDD from the data. |