MEANS Procedure

Example 13: Using the STACKODSOUTPUT option to control data

Features:

PROC PRINT

PROC CONTENT

The first example does not use the STACKODSOUTPUT option. The second example uses the STACKODSOUTPUT option.

Program

proc means data=sashelp.class;
class sex;
var weight height;
ods output summary=default;
run;
proc print data=default; run;
proc contents data=default; run;

Program Description

This code processes the data without using the STACKODSOUTPUT option.
proc means data=sashelp.class;
class sex;
var weight height;
ods output summary=default;
run;
Prints the data using PROC PRINT. Print the contents of the procedure using PROC CONTENTS.
proc print data=default; run;
proc contents data=default; run;

OUTPUT

The following outputs show the difference in processing data using the STACKODSOUTPUT option and then not using the option.
This output is generated without the STACKODSOUTPUT option.
Output without Using the STACKODSOUTPUT Option
Output without the STACKODSOUTPUT option.
Output without the STACKODSOUTPUT
Output without the STACKODSOUTPUT
This code processes the data using the STACKODSOUTPUT option.
proc means data=sashelp.class STACKODS;
class sex;
var weight height;
ods output summary=stacked;
run;
Print the data using PROC PRINT. Print the contents of the procedure using PROC CONTENTS.
proc print data=stacked; run;
proc contents data=stacked; run;
This output is generated with the STACKODSOUTPUT option.
Output Using the STACKODSOUTPUT Option
Output with the STACKODSOUTPUT option.
Output with the STACKODSOUTPUT option.
Output with the STACKODSOUTPUT option.