The DOCUMENT Procedure |
You can conditionally select a subset of entries in an ODS document for copying, listing, deleting, moving, or replaying by using WHERE expressions with the following statements:
WHERE expressions have this form:
(WHERE=(where-expression-1 <operator where-expression-n>)) |
is an arithmetic or logical expression that consists of a sequence of operators and operands.
is one of the following:
is a fixed value such as a date literal, a value, or a BY variable.
For information on SAS functions, see SAS Language Reference: Dictionary.
is a special kind of WHERE expression operand used by the DOCUMENT procedure to help you find common values in ODS documents. Here are the subsetting variables:
is the creation date of the current entry.
is the creation datetime of the current entry.
is the creation time of the current entry.
Example: |
The following DELETE statement deletes
all entries with a creation time of 9:25:19 PM:
delete ^(where=(_ctime_ = '9:25:19pm't)); run; |
is the label of the current entry.
Example: |
The following LIST statement lists all
tables containing the label 'Type III Model' within the GLM procedure:
list glm(where=(_type_ = 'table' _label_ ? 'Type III Model')); run; |
is the path to the label of the current entry. Document label paths are formed by concatenating the labels and sequence numbers, and then separating them with the forward slash (/) symbol. Document label paths are similar to the label paths specified by the ODS TRACE statement.
For example, if the ODS TRACE label path is:
'The Univariate Procedure'.'Normal_x'.'Histogram 1'The corresponding document label path is:
'The Univariate Procedure'#1\'Normal_x'#1\'Histogram 1'#1Note that in document label paths, the instances of '.' are replaced with '\'.
Example: |
The following LIST statement lists all
items containing "Fit Statistics" in the label path.
list gml(where=(_labelpath_ ? "Fit Statistics"))/levels=all; run; |
See also: | ODS TRACE Statement |
is the modification date of the current entry.
is the modification datetime of the current entry.
Example: |
The following REPLAY statement replays
all entries with a modification datetime of May 1, 2003, at 9:30:
replay ^(where=(_mdatetime_ = '01may04:9:30:00'dt)); run; |
is the modification time of the current entry.
is the name of the current entry.
Example: |
The following DELETE statement deletes
all entries that contain the name "stemleng" within the GLM procedure:
delete glm(where=(_name_ ? 'stemleng')); |
is the path of the current entry.
Example: |
The following LIST statement lists all
entries with a path containing the substring 'Anova' at all levels of the
current directory:
list ^(where=(_path_ ? 'Anova')); run; |
is the sequence number of the current entry.
Example: |
The following REPLAY statement replays
all entries that have a sequence number of 2 in the GLM procedure:
replay glm(where=(_seqno_ = 2)); |
See also: | Understanding Sequence Numbers |
is the type of the current entry.
is the name of a BY variable.
compares one variable with a value or another variable. operator can be AND, OR NOT, OR, AND NOT, or a comparison operator.
Symbol | Mnemonic Equivalent | Definition |
---|---|---|
= | EQ | Equal to |
^= or ~= or ¬= or <> | NE | Not equal to |
> | GT | Greater than |
< | LT | Less than |
>= | GE | Greater than or equal to |
<= | LE | Less than or equal to |
|
IN | Equal to one from a list of values |
Requirement: | Enclose where-expression in quotation marks. |
See also: | You can use any expression that can be used in the WHERE= data set option. For information on expressions that you can use in the WHERE= data set option, see the WHERE= data set option in SAS Language Reference: Dictionary and "WHERE-Expression Processing" in SAS Language Reference: Concepts. |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.