The CONTENTS procedure will give you the names, formats, and many
other details. Default output is to list variable names in
alphabetical order, and the VARNUM option will display the variables
in column order from left to right.
Try an ODS TRACE ON; Before a UNIVARIATE to learn the ODS names of
data that can be pulled from UNIVARIATE and routed to other datasets
for more concise reporting. The min max info is in ExtremeObs. You
can get those with ODS SELECT statements .
PS: Here's something I wrote yesterday that does that kind of
Use this program to report extreme observations found
in the wais and wms cognitive datsets. Output
reports extreme obs with subject id number (IND_ID) and
folder number, to facilitate location in the files.
OPTIONS MLOGIC MERROR SYMBOLGEN SOURCE2;
title1 'Data Quality Report';
%macro RUNEM( WHATDATA );
out= &WHATDATA._contents (keep= name varnum);
proc sort data= &WHATDATA._contents;
%* delete ID variables and other stuff not needed for this analysis;
if lowcase(name)='ind_id' then delete;
if lowcase(name)='folder' then delete;
put name @@;
ODS OUTPUT ExtremeObs = &WHATDATA._ExtremeObs ;
ODS LISTING CLOSE;
%include 'c:\temp\vnames.sas'; ; %* yes two sems here;
id ind_id folder ;
data &WHATDATA._ExtremeObs ;
set &WHATDATA._ExtremeObs ;
varname = "Variable Name"
low = "Low Score"
ind_id_low = "IND_ID of Low Score"
folder_low = "FOLDER of Low Score"
high = "High Score"
ind_id_high= "IND_ID of High Score"
folder_high= "FOLDER of High Score"
drop lowobs highobs FOLDER_LOW FOLDER_HIGH;
title2 "&WHATDATA extreme scores / observations";
title3 'Variables ordered by appearance in assessment instrument and
final dataset [VARNUM]';
title4 "Output reports the 5 lowest and 5 highest extreme scores for
each variable listed";
PROC PRINT double label uniform
VAR LOW -- IND_ID_HIGH;
/* Note, above the ODS listing is closed for univariate to suppress
over 200 pages of output
that we don't want to print. This output is redirected to temporary
datsets for proc print.
The listing is then open for the proc print where the output is
consolidated to less than
40 pages of output for each wais or wms quality check analysis.
Thanks Kirk Lafler for the 'Output Delivery System (ODS) tips and
On Dec 14, 2:42 pm, sasstud...@gmail.com wrote:
> I am working with a file with a large number of variables and I would
> like to create a concise list of all the variables in a file. For
> Name format #obs avg min max std
> Please advise about options of proc univariate or other procedures.
> Best regards,