Chapter Contents

Previous

Next
The ODS Statements

ODS EXCLUDE Statement


Specifies output objects to exclude from ODS destinations.

Default: Not using the ODS EXCLUDE statement is the same as specifying
ODS EXCLUDE NONE;
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 SELECT Statement


ODS <ODS-destination> EXCLUDE exclusion(s) | ALL | NONE;


Required Arguments

exclusion(s)
identifies the output objects to add to an exclusion list. By default, ODS automatically modifies exclusion lists at the end of a DATA step that uses ODS or at the end of a procedure step. For information on modifying these lists, see Modifying Selection and Exclusion Lists. For information ending a procedure or DATA step, see the section on DATA Step Processing in SAS Language Reference: Concepts.

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

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

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 exclusion list, even if the DATA or procedure step ends, until you explicitly modify the list with

  • any ODS SELECT statement

  • ODS EXCLUDE NONE

  • ODS EXCLUDE ALL

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

ALL
sets the list to EXCLUDE ALL.
Interaction: If you specify ALL without specifying a destination, ODS sets the overall list to EXCLUDE ALL and sets all other lists to their defaults.
Tip: Using EXCLUDE ALL is different from closing a destination. The destination remains open, but ODS does not send any output objects to the destination.

NONE
sets the list to EXCLUDE NONE, which has the same effect as SELECT ALL.
Interaction: If you specify NONE without specifying a destination, ODS sets the overall list to EXCLUDE NONE and sets all other lists to their defaults.


Options

ODS-destination
specifies which ODS destination's exclusion 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 exclusion list.
Tip: To set the exclusion list for the Output destination to something other than the default, use the ODS OUTPUT statement (see ODS OUTPUT Statement).


Chapter Contents

Previous

Next

Top of Page

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