Deleting Unwanted Observations
So far in this chapter, you've learned to use IF-THEN statements to execute assignment statements conditionally. But you can specify any executable SAS statement in an IF-THEN statement. For example, you can use an IF-THEN statement with a DELETE statement to determine which observations to omit as you read data.
The IF-THEN statement executes a SAS statement when the condition in the IF clause is true.
The DELETE statement stops the processing of the current observation.
General form, DELETE statement:
To conditionally execute a DELETE statement, you submit a statement in the following general form:
IF expression THEN DELETE;
If the expression is