10# goodbody
/* Let's illustrate with an example.
Suppose the results we are interested in is the basic measurements of variable1 in data one*/
data one;
input variable1 variable2;
datalines;
1 2
4 5
7 8
;
run;
ods trace on;
proc univariate data=one;
var variable1;
run;
ods trace off;
/* We can find the names of all results in log window:
57 ods trace on;
58
59 proc univariate data=one;
60 var variable1;
61 run;
NOTE: Writing HTML Body file: sashtml3.htm
Output Added:
-------------
Name: Moments
Label: Moments
Template: base.univariate.Moments
Path: Univariate.variable1.Moments
-------------
Output Added:
-------------
Name: BasicMeasures
Label: Basic Measures of Location and Variability
Template: base.univariate.Measures
Path: Univariate.variable1.BasicMeasures
-------------
Output Added:
-------------
Name: TestsForLocation
Label: Tests For Location
Template: base.univariate.Location
Path: Univariate.variable1.TestsForLocation
-------------
Output Added:
-------------
Name: Quantiles
Label: Quantiles
Template: base.univariate.Quantiles
Path: Univariate.variable1.Quantiles
-------------
Output Added:
-------------
Name: ExtremeObs
Label: Extreme Observations
Template: base.univariate.ExtObs
Path: Univariate.variable1.ExtremeObs
-------------
NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 0.37 seconds
cpu time 0.09 seconds
62
63 ods trace off; */
*Suppose we want to export the BasicMeasures to Excel. After submitting the following codes, we will find SAS data b in work library*/
ods output BasicMeasures=b;
proc univariate data=one;
var variable1;
run;
/*
1. In the previous step, we have saved the result into SAS work library and in data b.
2. Let's save SAS data b into Excel file b, and put the Excel file forb on desktop.
- Click on " File"on the upper left corner
- Click on "Export Data"
- Library: "WORK", Member: "B", and Click on "Next"
- Select "Microsift Excel 97, 2000 or 2002 Workbook", and Click on "Next"
- Click on "Browse"
- Click on Desktop on the left, Filename:"forb", and click on "Save"
- Click on "OK"
- Assign a name to the exported table: "b", and click on "Finish"
- On desktop, you will see Excel file forb which contains the SAS result you have selected. */