When I run this code:
select input(put(99,8.),$2.) as _99
I get a column of 99's.
When I run an equivalent DATA step:
_99 = input(put(99,8.),$2.);
I get all blanks. That makes sense, because the PUT function generates a
string with two 9's right justified in an 8-character string but the INPUT
function only scans the first 2 characters vecause of the width specified
for the informat.
So why does SQL find those two digits and propagate them into the result?
Why is this expression evaluated differently in the two contexts?