The FSEDIT Procedure |
Restriction: | The WHERE statement causes an error if it is used in conjunction with a PROC FSEDIT statement that includes the NEW= option. |
WHERE expression; |
Argument |
expression |
is any valid WHERE expression that includes one or more of the variables in the input data set. Refer to the description of the WHERE statement in SAS Language Reference: Dictionary for details about the operators and operands that are valid in WHERE expressions. |
Using the WHERE Statement |
By default, the FSEDIT procedure displays all of the observations in the data set. The WHERE statement is useful when you want to process only a subset of the observations in a SAS data set. For example, to process only observations for which the value of the variable YEAR is less than 5, follow the PROC FSEDIT statement with this statement:
where year<5;
The FSEDIT procedure displays only observations that meet the specified condition(s). Observations that do not satisfy the condition(s) are not shown and cannot be edited. If no observations meet the specified condition(s), a blank observation is displayed that has observation number 0. In this case, a warning message is also displayed in the window's message line.
Conditions that are imposed by a WHERE statement (or, equivalently, by a WHERE= data set option) are called permanent WHERE clauses because they remain in effect for the duration of the FSEDIT session and cannot be canceled or modified while the procedure is active.
When you use a WHERE statement in conjunction with the PROC FSEDIT statement, the behavior of the FSEDIT procedure is affected in the following ways:
The word Subset appears in parentheses following the FSEDIT window title to indicate that a permanent WHERE clause is in effect.
Observation numbers might not be sequential because some observations might be excluded.
You cannot scroll directly to a particular observation by typing the corresponding observation number on the command line.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.