END Statement

Ends DO group or SELECT group processing.

Valid in: DATA step
Categories: CAS
Control
Type: Declarative

Syntax

END;

Without Arguments

Use the END statement to end DO group or SELECT group processing.

Details

The END statement must be the last statement in a DO group or a SELECT group.

Example: Using the END Statement

This example shows how to use the END statement to end a simple DO group.

do;
      ...more SAS statements...
end;

This example shows how to use the END statement to end a simple SELECT group.

select(expression);
   when(expression) SAS statement;
   otherwise SAS statement;
end;

See Also

Last updated: June 17, 2025