|
Ken, the purpose of this is a little different than the usual data step.
Our data step is being used to check if a user supplied expression is valid
in an IF statement. If an error is detected in the data step then this
indicates an error in the expression. The problem is that type mismatches
are not flagged as errors by SAS but we want them to be considered invalid.
The conversion is done automatically by SAS and there is only a note in the
log.
Testing the expression in a WHERE statement would work better because WHERE
statements (unlike IF statements) do not allow type mismatches. The problem
with testing with WHERE is that it allows a number of special expressions
that the IF statement does not allow.
|