LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Jul 2008 15:13:55 -0500
Reply-To:     "data _null_," <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_," <datanull@GMAIL.COM>
Subject:      Re: how to control decimals in proc surveyfreq output?
Comments: To: Adriano Rodrigues <adriano@gpp.com.br>
In-Reply-To:  <001401c8e7a2$ee5cda80$cb168f80$@com.br>
Content-Type: text/plain; charset=ISO-8859-1

I didn't write all that code it was copied from the output from the SOURCE statement.

Then it is just a matter of finding the part you need to change...

On 7/16/08, Adriano Rodrigues <adriano@gpp.com.br> wrote: > Thanks! I Will try to understand it all! > > Adriano > > > -----Mensagem original----- > De: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] Em nome de data > _null_, > Enviada em: quarta-feira, 16 de julho de 2008 12:54 > Para: SAS-L@LISTSERV.UGA.EDU > Assunto: Re: how to control decimals in proc surveyfreq output? > > As I understand it you need to modify the template. See comment below > /* changed here*/ . I don't know how to just modify and copy so I > redefine the entire template. Template expert help need. > > 1) determine the name of the template the need to be modified(ods trace) > 2) get source using proc template source statement. copy code to program. > 3) modify and submit.... > > ods path work.temp(update) sashelp.tmplmst(read); > proc template; > source Stat.SurveyFreq.OneWayFreqs; > define table Stat.SurveyFreq.OneWayFreqs; > notes "One-Way Distribution table"; > dynamic page needlines pname varname plabel varlabel confp > varjust pfoot missing; > column FVariable Variable Frequency WgtFreq StdDev VarWgtFreq > LowerCLWgtFreq UpperCLWgtFreq CVWgtFreq Percent TestPercent StdErr Var > LowerCL UpperCL CV > DesignEffect; > header h1 h2 h3 h4; > footer f1; > translate _val_=._ into ""; > define h1; > text "Table of " varname; > space = 1; > print = pname; > spill_margin; > end; > define h2; > text varlabel; > space = 1; > split = ""; > print = plabel; > spill_margin; > end; > define h3; > text "; " confp BEST8. %nrstr("%% Confidence Limits; for > Wgt Freq"); > end = UpperCLWgtFreq; > start = LowerCLWgtFreq; > end; > define h4; > text ";" confp BEST8. %nrstr("%% Confidence Limits; for > Percent"); > end = UpperCL; > start = LowerCL; > end; > define FVariable; > just = varjust; > style = RowHeader; > id; > generic; > end; > define Variable; > print = OFF; > generic; > end; > define Frequency; > header = "; Frequency;"; > glue = 2; > format = BEST10.; > end; > define WgtFreq; > header = "; Weighted;Frequency"; > glue = 4; > format = D10.; > end; > define StdDev; > header = ";Std Dev of; Wgt Freq"; > format = D10.; > end; > define VarWgtFreq; > header = ";Variance of; Wgt Freq"; > format = D10.; > end; > define LowerCLWgtFreq; > glue = 100; > format = D10.; > print_headers = OFF; > end; > define UpperCLWgtFreq; > format = D10.; > print_headers = OFF; > end; > define CVWgtFreq; > header = "; CV for;Wgt Freq"; > format = 9.4; > end; > define Percent; > header = "Percent"; > glue = 4; > format = 7.4; > end; > define TestPercent; > header = "; Test;Percent;"; > format = 6.2; > end; > define StdErr; > header = ";Std Err of; Percent"; > format = 7.4; > end; > define Var; > header = ";Variance of; Percent"; > format = 10.4; > end; > define LowerCL; > glue = 100; > format = 9.2; /*changed here*/ > print_headers = OFF; > end; > define UpperCL; > glue = 10; > format = 9.2; /* and here */ > print_headers = OFF; > end; > define CV; > header = "; CV for;Percent"; > format = 9.4; > end; > define DesignEffect; > header = ";Design;Effect"; > format = 8.4; > end; > define f1; > text "Frequency Missing = " missing -12.99; > print = pfoot; > end; > control = control; > required_space = needlines; > newpage = page; > underline; > overline; > use_name; > end; > > run; > > > ods trace on; > proc surveyfreq data=sashelp.class; > tables sex / cl nowt; > run; > ods trace off; > > > On 7/16/08, Adriano Rodrigues <adriano@gpp.com.br> wrote: > > Hi all, > > > > > > > > What i am doing is: > > > > > > > > data anax1; > > > > set anax; > > > > proc surveyfreq ; > > > > table p5 /cl nowt ; > > > > ods output OneWay=t; > > > > weight wg; > > > > format p5 p5v.; > > > > run; > > > > > > > > proc print data=t; > > > > var f_p5 percent lowercl uppercl; > > > > format percent lowercl uppercl 9.2; > > > > run; > > > > > > > > > > > > Does anyone know hot to apply this 9.2 format to tables direct into > > surveyfreq table? Or I really need this step with proc print? > > > > > > > > > > > > Thanks in advance, > > > > Adriano > > > >


Back to: Top of message | Previous page | Main SAS-L page