Creating the DIVFMT. and USETYPE. Formats
proc format;
value divfmt 1='New England'
2='Middle Atlantic'
3='Mountain'
4='Pacific';
value usetype 1='Residential Customers'
2='Business Customers';
run;
Creating the DistrData Data Set
data distrdata;
drop n;
label Normal_x='Normal Random Variable'
Exponential_x='Exponential Random Variable';
do n=1 to 100;
Normal_x=10*rannor(53124)+50;
Exponential_x=ranexp(18746363);
output;
end;
run;
Creating the Univ ODS Document
ods document name=univ;
title '100 Obs Sampled from a Normal Distribution';
proc univariate data=distrdata noprint;
var Normal_x;
histogram Normal_x /normal(noprint) cbarline=grey name='normal';
run;
title '100 Obs Sampled from an Exponential Distribution';
proc univariate data=distrdata noprint;
var Exponential_x;
histogram /exp(fill l=3) cfill=yellow midpoints=.05 to 5.55 by .25
name='exp';
run;
ods document close;
title;
1082 Appendix 2 Example Programs

Get SAS 9.4 Output Delivery System, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.