[sas-users] SOLUTION Displaying Output of different widths

aneesah.n.williams at census.gov aneesah.n.williams at census.gov
Thu Aug 18 13:16:45 EDT 2011


Thanks all!  Proc report had just the thing.   Each variable was put into
the define statement with the NOZERO option.  So, those columns don't
display if they are all nonzeros.

Thanks Suzanne!

proc transpose data = reported(where=(year=2008))
               name = varnam
                out = getvarnames(keep=varnam);
run;

data _null_;
  set getvarnames;
  call symput("var"||left(_n_),varnam);
run;

%macro seeresults;
proc report data = outp.rsltsbyst_w_distgr(keep=stabb method dev: absdev:
sqddev:)
             out = outp.testing nowindows headline headskip;
  by stabb;
    %do j = 1 %to 145;
  define dev&&var&j / nozero;
  define absdev&&var&j / nozero;
  define sqddev&&var&j / nozero;
    %end;
run;
%mend;

%seeresults


======================
Aneesah Williams
Statistical Methods Branch
Governments Division
U.S. Census Bureau
301-763-5995



                                                                                                                                       
  From:       suzanne.marie.dorinski at census.gov                                                                                        
                                                                                                                                       
  To:         sas-users list for SAS Users Group <sas-users at lists.census.gov>                                                          
                                                                                                                                       
  Date:       08/18/2011 12:43 PM                                                                                                      
                                                                                                                                       
  Subject:    Re: [sas-users] Displaying Output of different widths                                                                    
                                                                                                                                       
  Sent by:    sas-users-bounces at lists.census.gov                                                                                       
                                                                                                                                       





If you are using PROC REPORT, there's a NOZERO option available on the
DEFINE statement.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473627.htm
 is the documentation.  It says it has no effect on ODS destinations other
than traditional SAS monospace output, but I used NOZERO with ODS
TAGSETS.EXCELXP back in May, and it did what I wanted it to do.



Suzanne

********************************

Suzanne.Marie.Dorinski at census.gov
Mathematical Statistician
GOVS
6K054E
U.S. Census Bureau
301-763-4869

********************************

-----sas-users-bounces at lists.census.gov wrote: -----

 To: sas-users at lists.census.gov
 From: aneesah.n.williams at census.gov
 Sent by: sas-users-bounces at lists.census.gov
 Date: 08/18/2011 12:23PM
 Subject: [sas-users] Displaying Output of different widths

 I have an output data set by state with hundreds of variables, not all of
 which are valid for every state.  Can anyone help me to display on those
 columns that are nonblank for each state?

 Thanks,

 ======================
 Aneesah Williams
 Statistical Methods Branch
 Governments Division
 U.S. Census Bureau
 301-763-5995

 _______________________________________________
 sas-users mailing list
 sas-users at lists.census.gov
 http://lists.census.gov/mailman/listinfo/sas-users
_______________________________________________
sas-users mailing list
sas-users at lists.census.gov
http://lists.census.gov/mailman/listinfo/sas-users





More information about the sas-users mailing list