Chapter Contents |
Previous |
Next |
Using the Output Delivery System |
You can use the ODS SELECT statement to deliver only certain tables to open ODS destinations. In the following example, the MODEL procedure is used to fit a model for new one-family home sales.
title 'Modeling One-Family Home Sales'; data homes; input year q pop yn cpi @@; y=yn/cpi; label q='New One-Family Houses Sold in Thousands' pop='U.S. Population in Millions' y='Real Personal Income in Billions' cpi='U.S. CPI 1982-1984 = 100'; datalines; 70 485 205.052 715.6 .388 71 656 207.661 776.8 .405 72 718 209.896 839.6 .418 73 634 211.909 949.8 .444 74 519 213.854 1038.4 .493 75 549 215.973 1142.8 .538 76 646 218.035 1252.6 .569 77 819 220.239 1379.3 .606 78 817 222.585 1551.2 .652 79 709 225.055 1729.3 .726 80 545 227.719 1918.0 .824 81 436 229.945 2127.6 .909 82 412 232.171 2261.4 .965 83 623 234.296 2428.1 .996 84 639 236.343 2668.6 1.039 85 688 238.466 2838.7 1.076 86 750 240.658 3013.3 1.096 87 671 242.820 3194.7 1.136 88 676 245.051 3479.2 1.183 89 650 247.350 3725.5 1.240 90 536 249.975 3945.8 1.307 ; ods select ResidSummary ParameterEstimates; ods trace on; ods show;
The ODS SELECT statement specifies that only the two tables "ResidSummary" and "ParameterEstimates" are to be delivered to the ODS destinations. In this example, no ODS destinations are explicitly opened. Therefore, only the SAS listing, which is open by default, receives the procedure output. The ODS SHOW statement displays the current overall selection list in the SAS log. The ODS TRACE statement writes the trace record of the ODS output objects to the SAS log. In the following statements, the MODEL procedure is invoked to produce the output.
proc model data=homes; parms a b c d; q = a + b*y + c*lag(y) + d*pop; %ar(ar_q,1,q) endo q; exo y pop; id year; fit q / dw; run;
Output 6.4.1 displays the results of the ODS SHOW statement, which writes the current overall selection list to the SAS log. As specified in the preceding ODS SELECT statement, only the two ODS tables "ResidSummary" and "ParameterEstimates" are selected for output.
Output 6.4.1: Results of the ODS SHOW Statement
|
|
ods show; quit; ods show;
The results of the statements are displayed in Output 6.4.3. Before the MODEL procedure terminates, the ODS selection list includes only the two tables, "ResidSummary" and "ParameterEstimates."
Output 6.4.3: The ODS Selection List, Before and After PROC MODEL Terminates
|
The entire displayed output consists of the two selected tables, as displayed in Output 6.4.4.
Output 6.4.4: The Listing Output of the ResidSummary and ParameterEstimates Tables from PROC MODEL
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.