| Example: Using the INFOMAPS Procedure and the Information Maps Engine |
You can use the MEANS procedure to analyze the annual salary data that you have retrieved from the information map. For the purpose of this example, you will use a DATA step to apply a filter to view only the data for the employees in the Host Systems Development division. You will then use the MEANS procedure to analyze the annual salary data for the mean, the minimum, and the maximum salaries for each job code in the division. And, finally, a report will be produced with ODS (Output Delivery System).
The following code analyzes the data and produces an ODS report:
data work.HRinfo; set HR_Data."Employee Info"n(filter="Host Systems Development"n); keep jobcode "Annual Salary"n; run; /* Produce an ODS report. */ ods html body="example-body.htm"; /* Analyze the annual salary distribution data. */ proc means data=work.HRinfo maxdec=0; var "Annual Salary"n; class jobcode; title "Annual Salary by Job Code"; run; ods html close;
Log for the DATA Step and the MEANS Procedure
126 data work.HRinfo;
127 set HR_Data."Employee Info"n(filter="Host Systems Development"n);
128 keep jobcode "Annual Salary"n;
129 run;
NOTE: There were 21 observations read from the data set
HR_DATA.'Employee Info'n.
NOTE: The data set WORK.HRINFO has 21 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.78 seconds
cpu time 0.29 seconds
130
131 /* Produce an ODS report. */
132 ods html body="example-body.htm";
NOTE: Writing HTML Body file: example-body.htm
133
134 /* Analyze the annual salary distribution data. */
135 proc means data=work.HRinfo maxdec=0;
136 var "Annual Salary"n;
137 class jobcode;
138 title "Annual Salary by Job Code";
139 run;
NOTE: There were 21 observations read from the data set WORK.HRINFO.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.06 seconds
cpu time 0.04 seconds
140
141 ods html close;
Output from the MEANS Procedure
The MEANS Procedure
Analysis Variable : Annual Salary Physical column SALARY
Physical
column N
JOBCODE Obs N Mean Std Dev Minimum
---------------------------------------------------------------------
HSD001 1 1 30000 . 30000
HSD002 4 4 39625 11940 27000
HSD003 1 1 29000 . 29000
HSD004 3 3 47667 20108 31000
HSD005 2 2 57500 3536 55000
HSD006 1 1 120000 . 120000
HSD007 4 4 65750 9777 57000
HSD008 5 5 61000 18990 45000
The report that is produced by ODS should look similar to the following:
Report Displayed in the Results Viewer
![[Report produced by ODS]](images/ods.gif)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.