Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Using the Output Delivery System

Example 6.3: Determining the Names of ODS Tables

In order to select or exclude a table, or to render it as a SAS data set, you must first know its name. You can obtain the table names in several ways:

This example uses the ODS TRACE statement with the LISTING option to obtain the names of the created output objects. By default, the ODS TRACE statement writes its information to the SAS log. However, you can specify the LISTING option to have the information interleaved with the procedure output in the SAS listing.

The model will be the U.S. population model from the previous example.


   ods trace on/listing;

   title 'Logistic Growth Curve Model of U.S. Population';
   proc model data=uspop;
      label a = 'Maximum Population'
            b = 'Location Parameter'
            c = 'Initial Growth Rate';
      pop = a / ( 1 + exp( b - c * (year-1790) ) );
      fit pop start=(a 1000  b 5.5  c .02)/ out=resid outresid;
   run;

   ods trace off;

The purpose of these statements is to obtain the names of the ODS tables produced in this PROC MODEL run. The ODS TRACE ON statement writes the trace record of ODS output tables. The LISTING option specifies that the information is interleaved with the output and written to the SAS listing.

The MODEL procedure is invoked to perform the analysis, the SAS listing receives the procedure output and the trace record, and the trace is then turned off with the OFF option.

Output 6.3.1: The ODS Trace, Interleaved with MODEL Results: Partial Results
                                       The MODEL Procedure

Output Added:
-------------
Name:       ResidSummary
Label:      Nonlinear OLS Summary of Residual Errors
Template:   ets.model.ResidSummary
Path:       Model.OLS.ResidSummary
-------------


                            Nonlinear OLS Summary of Residual Errors

                 DF     DF                                              Adj
Equation      Model  Error       SSE       MSE  Root MSE  R-Square     R-Sq  Label

pop               3     18     345.6   19.2020    4.3820    0.9972   0.9969  U.S. Population
                                                                             in Millions

Output Added:
-------------
Name:       ParameterEstimates
Label:      Nonlinear OLS Parameter Estimates
Template:   ets.model.ParameterEstimates
Path:       Model.OLS.ParameterEstimates
-------------


                               Nonlinear OLS Parameter Estimates

                                    Approx                  Approx
      Parameter       Estimate     Std Err    t Value     Pr > |t|    Label

      a               387.9307     30.0404      12.91       <.0001    Maximum Population
      b               3.990385      0.0695      57.44       <.0001    Location Parameter
      c               0.022703     0.00107      21.22       <.0001    Initial Growth Rate

As displayed in Output 6.3.1, the ODS TRACE ON statement writes the name, label, template, and path name of each generated ODS table. For more information on names, labels, and qualified path names, see the discussion in the section "Using the Output Delivery System".

The information obtained with the ODS TRACE ON statement enables you to request output tables by name. The examples that follow demonstrate how you can use this information to select, exclude, or create data sets from particular output tables.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.