As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Bench Marking Proc Freq

From sasCommunity
Jump to: navigation, search

This article shows programs used to bench mark Proc Freq.

This program ProcFreq-call-exec is called repetitively by DOS-for-loop.bat or Call-Exec-Suite.bat

rem ProcFreq-call-exec.bat
sas ProcFreq-call-exec
*name: ProcFreq-call-exec.sas;
options obs = 3;*testing;
*options obs = 13;*testing;
%Let CxData     = Library.ListNames_all;
%Let CxIncludes = Project(ProcFreq) Project(save-ratios)/nosource2;
%Let CxIncludes = Project(ProcFreq) /nosource2;
%Include SiteIncl(CallExecInclude)/nosource2;

Note: this program creates an output data set, no listing is created because the noprint option is used.

%* Name: ProcFreq.sas,  subroutine of SmryEachVar;
PROC Freq data   = &LibName..&MemName.;
          format   &Name.;%*remove formatting;
          tables   &Name.
                 / list missing noprint
             out = Freq;
run;

This program is used to generate Proc Freq statements for each data set and each variable in a particular libref.

Note: output is data set, not listing.

Title2 ProcFreq-each-column;
%Let Libname = SAShelp;
*options obs = 3;*testing;
DATA _Null_;
do   until(EndoFile);
set  SAShelp.vcolumn
    (where = (    Libname eq "%upcase(&Libname.)"
              and MemType eq 'DATA'
    )        )
     end   =  EndoFile;
call execute(catt("Proc Freq data = &Libname.."
                 ,MemName
                 ,catx(' ',';Title3'
                      ,Memname,';'
                      ,'tables',Name
                      ,'/ list missing noprint out = Freq;'
             )   )    );
end;
stop;
run;

This program generates a Proc Freq for each Memname in the libref; default is tables _all_.

Note output is to listing.

Title2 ProcFreq-each-table;
%Let Libname = SAShelp;
*options obs = 1;*testing;
DATA _Null_;
do   until(EndoFile);
set  SAShelp.vtable
    (where = (    Libname eq "%upcase(&Libname.)"
              and MemType eq 'DATA'
    )        )
     end   =  EndoFile;
call execute(catt("Proc Freq data = &Libname.."
                 ,MemName
                 ,catx(' ',';Title3',Memname,';')
            )    );
end;
stop;
run;


--macro maven == the radical programmer 10:46, 7 April 2008 (EDT)