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

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

SmryEachVar A Data Review Suite

From sasCommunity
Jump to: navigation, search

SmryEachVar: A Data Review Suite For Each Variable in All Data Sets in a Libref

previously known as:

Summarize Memnames in Libname

Author: Ronald J. Fehd

Abstract: This paper providess a set of parameterized include module, routines and subroutines which provide a summary of each data set (Memname) in a library (Libname).


  1. call execute routine ProcFreq (previously FreqAll), on all variables in each data set in a library.
  2. for numerics add: ProcMode and ProcSmry

Purpose: data review

Audience: data managers, intermediate to advanced users and macro programmers

Keywords: call execute, data review, dynamic programming, includes, list processing, nrstr, routines, source2, subroutines%, sysparm


Users responded favorably to Fehd's fall 2006 paper: FreqAll which provides a concise summary data set of one data set: one Memname.

And, of course, everyone wants to run this data review routine on every member in their library! ... or just one!

Updates of 2009-June

  • simplified modules for user copy and edit
  • changed parameter names:
    • In_Data: sashelp.class, library._all_
    • Out_Txt for reports

Updates of 2008-May

Based on feedback and commentary from our user community since I published this suite in the fall RUGs and at SGF-2008 I have added the following features:

  • added parameter: DotSAS, default: blank, set to .sas for Unix usage
  • added parameter: Memname, default: _all_

users can now choose just one data set to review

  • added parameter, ExportFreq2csv, when true, 1, writes

proc freq output data set to .csv when CardRatio lt .5

  • removed variable Unique and replaced with:
  • added variables: CardRatio and CardNote which provide information of Cardinality Ratio, which is calculated as NobsFreq / NobsData.


  • provided format value CardRatio; proc format is automagically submitted

by autoexec if not cexist(Library.Formats.CardRatio.format)

  • report of duplicate names is executed only when Memname ne _all_
  • consolidated 5 CallX* programs into CallXany; this reduces the level of %includes
  • new program CallXany which transforms _character_ variables into macro variables

and calls the named parameterized %include program


see also successors:

BibTex entry for this page and paper:

    booktitle={SAS Community Wiki},
    year     = 2008,
    author   ={Ronald J. Fehd},
    title    ={{SmryEachVar}: A Data Review Suite For Each Variable in All Data Sets in a Libref},
    note     ={has .zip with version 2},
    url      ={}}

    booktitle={Proceedings of the SAS Global Forum},
    year     = 2008,
    author   ={Ronald J. Fehd},
    title    ={{SmryEachVar}: A Data-Review Routine for All Data Sets in a Libref},
    note     ={Applications Development (Best Contributed Paper), 25 pp.;
    url      ={}}

-- created by User:Rjf2 17:09, 7 March 2008 (EST)

--Ronald_J._Fehd macro.maven == the radical programmer