getcat

Captures the categorical variables and inserts them into comments.

%getcat (data=dataset name,
                   outlib=
output library);

Where Is Type... And represents...
dataset name C (200) The name of the dataset to be ordered including the libname.  This uses the dot notation such as libname.dataset.  If only the dataset name is given, the work area is implied.
outlib C (200) This is the libname to the location of the _DEFINE dataset.

Details
This utility will evaluate the data for both numeric and characters in attempt to find categorical variables.  It determines if the variable is categorical if the following criteria are met.

  1. If the distinct list of values are less than 20 items.
  2. If the concatenation of all the categorical variables are less than 200 characters.

Once categorical variables are determined, it would concatenate the values with comma separation in the following format:

Values: value1, value2, value_n

The word "Values:" is inserted at the beginning along with the comma.  This text is then inserted in the comment field of the specified _DEFINE dataset if the comment field is currently blank.

Example

libname inlib '/my/study/directory';

%getcat(data=inlib.a_ae,outlib=inlib);

%getcat(data=inlib,outlib=inlib);  

 
    Definedoc - DEFINE.XML Software,  Meta-Xceed Inc.© 2009
Bookmark and Share