Valid in: | DATA step |
Category: | Control |
Type: | Executable |
The way a when-expression is used depends on whether a select-expression is present.
/* INCORRECT usage to select value of 2 */ select (x); /* evaluates T/F and compares for */ /* equality with x */ when (x=2) put 'two'; end; /* correct usage */ select(x); /* compares 2 to x for equality */ when (2) put 'two'; end; /* correct usage */ select; /* compares 2 to x for equality */ when (x=2) put 'two'; end;