Chapter Contents

Previous

Next
The ODS Statements

ODS SELECT Statement


Specifies output objects for ODS destinations.

Default: Not using the ODS SELECT statement is the same as specifying
ODS SELECT ALL;
Tip: Although you can maintain a selection list for one destination and an exclusion list for another, it is easier to understand the results if you maintain the same types of lists for all the destinations that you route output to.
See also: ODS EXCLUDE Statement
Featured in: Selecting Output for the HTML and Printer Destinations and Using a Selection List with Multiple Procedure Steps


ODS SELECT <ODS-destination> selection(s) | ALL | NONE;


Required Arguments

selection(s)
identifies output objects to add to a selection list. ODS sends the items in the selection list to all active ODS destinations. By default, ODS automatically modifies selection lists when a DATA step that uses ODS or a procedure step ends. For information on modifying these lists, see Modifying Selection and Exclusion Lists. For information ending DATA and procedure steps, see the section on DATA Step Processing in SAS Language Reference: Concepts.

Each selection has the following form:
output-object <(PERSIST)>
where

output-object
specifies one or more output objects to select.

To specify an output object, you need to know what output objects your SAS program produces. The ODS TRACE statement writes to the SAS log a trace record that includes the path, the label, and other information about each output object that is produced. (See ODS TRACE Statement.) You can specify an output object as

  • a full path (shown as the path in the trace record).

  • a partial path. A partial path consists of any part of the full path that begins immediately after a period (.) and continues to the end of the full path. For instance, if the full path is
       Univariate.City_Pop_90.TestsForLocation
    partial paths are
       City_Pop_90.TestsForLocation
       TestsForLocation

  • a label (surrounded by quotation marks).

  • a label path. (The trace record shows the label path only if you specify the LABEL option in the ODS TRACE statement.)

  • a partial label path. A partial label path consists of any part of the label that begins immediately after a period (.) and continues to the end of the label. For instance, if the label path is
       "The UNIVARIATE Procedure"."CityPop_90"
       ."Tests For Location"
    partial label paths are
       "CityPop_90"."Tests For Location" 
       "Tests For Location"

  • a mixture of labels and paths.

  • any of these specifications followed by a pound sign (#) and a number. For example, TestsForLocation#3 refers to the third output object named TestsForLocation.

PERSIST
keeps the output-object that precedes it in the selection list, even if the DATA or procedure step ends, until you explicitly modify the list with

  • any ODS EXCLUDE statement

  • ODS SELECT NONE

  • ODS SELECT ALL

  • an ODS SELECT statement that applies to the same output object but does not specify PERSIST.

Featured in: Using a Selection List with Multiple Procedure Steps

ALL
sets the list to SELECT ALL.
Interaction: If you specify ALL without specifying a destination, ODS sets the overall list to SELECT ALL and sets all other lists to their defaults.
Featured in: Using a Selection List with Multiple Procedure Steps

NONE
sets the list to SELECT NONE.
Interaction: If you specify NONE without specifying a destination, ODS sets the overall list to SELECT NONE and sets all other lists to their defaults.
Tip: Using NONE is different from closing a destination. The Output destination is still running, but ODS is restricting the output that it sends to the destination.


Options

ODS-destination
specifies which ODS destination's selection list to write to, where ODS-destination can be HTML, LISTING, or PRINTER. (See ODS Destinations.)
Default: If you omit ODS-destination, ODS writes to the overall selection list.
Tip: To set the selection list for the Output destination to something other than the default, use the ODS OUTPUT statement (see ODS OUTPUT Statement).
Featured in: Selecting Output for the HTML and Printer Destinations


Chapter Contents

Previous

Next

Top of Page

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