Sample 25379: Demonstrates ODS Selective Output
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample is from the SAS Sample Library. For additional information refer to "SAS Output Delivery System: User's Guide".
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: ODSHTM4 */
/* TITLE: DEMONSTRATES ODS SELECTIVE OUTPUT */
/* PRODUCT: BASE */
/* SYSTEM: ALL */
/* KEYS: ODS HTML OUTPUT LISTING SHOW SELECT EXCLUDE */
/* PROCS: UNIVARIATE PRINT PLOT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: */
/* */
/****************************************************************/
/* Point ODS in the right direction. */
/* Notice we are NOT closing the Listing file: */
/* HTML, Monospace, and Output Data sets will be created. */
ods html body="odshtm4.htm";
data class;
input name $ 1-8 sex $ 11 age 13-14
height 16-19 weight 21-25;
cards;
JOHN M 12 59.0 99.5
JAMES M 12 57.3 83.0
ALFRED M 14 69.0 112.5
WILLIAM M 15 66.5 112.0
JEFFREY M 13 62.5 84.0
RONALD M 15 67.0 133.0
THOMAS M 11 57.5 85.0
PHILIP M 16 72.0 150.0
ROBERT M 12 64.8 128.0
HENRY M 14 63.5 102.5
JANET F 15 62.5 112.5
JOYCE F 11 51.3 50.5
JUDY F 14 64.3 90.0
CAROL F 14 62.8 102.5
JANE F 12 59.8 84.5
LOUISE F 12 56.3 77.0
BARBARA F 13 65.3 98.0
MARY F 15 66.5 112.0
ALICE F 13 56.5 84.0
;
run;
/* Use the ODS Output statement to create an Output Data */
/* Set from the Quantiles Output Object. This data set */
/* can then be processed by another SAS Procedure at a */
/* later date. */
ods output quantiles = work.quantiles;
/* Use the ODS HTML statement to report the Moments and */
/* Quantiles Output Objects in HTML . */
ods html select moments quantiles;
/* Use the ODS Listing statement to direct all Output */
/* Objects Except for TestsForLocation and ExtremeObs to */
/* the Monospace Listing. */
ods listing exclude Testsforlocation Extremeobs;
/* Verify the Selection and Exclusion Lists are correct. */
/* Verify the List for the Output destination. */
ods output show;
/* Verify the List for the HTML destination. */
ods html show;
/* Verify the List for the Listing destination. */
ods listing show;
/* Verify the Overall List. */
ods show;
/* Now run Proc Univariate. */
title2 'Univariate Selective Output';
proc univariate data=class;
var weight;
run;
/* Verify that ODS reset All destination lists at the end */
/* of the Procedure step. */
ods output show;
ods html show;
ods listing show;
ods show;
/* Print the newly generated Quantiles Data Set, Print */
/* output will go to both HTML and Monospace destinations. */
proc print data=quantiles;
title2 'Print: Quantiles Data Set';
run;
/* Close Monospace Listing destination. */
ods listing close;
/* Lets plot our newly created data set, Quantiles */
/* Plot output will go to the HTML destination only. */
proc plot data=quantiles;
plot quantile * estimate;
run;
/* All done, let us take a look. */
ods html close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Demonstrates using ODS to select specific pieces of the output
| Type: | Sample |
| Topic: | Third Party ==> Output ==> HTML SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2005-08-10 03:02:31 |
| Date Created: | 2005-05-23 13:49:47 |
Operating System and Release Information
| SAS System | Base SAS | All | 8 TS M0 | n/a |