Hello dears SAS users
Have a look on it :
If i submit the following code (very basic code):
data STRANGE_LOG;
set sashelp.class(obs=3);
if vtype(age) eq "N" then do;
test=put(age, 8.);
end;
else if vtype(age) eq "C" then do;
test=age;
end;
run;
I will get the following log :
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
390:12
NOTE: There were 3 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.STRANGE_LOG has 3 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
But if i submit this code :
data STRANGE_LOG2;
set sashelp.class(obs=3);
if vtype(age) eq "N" then do;
test=put(age, 8.);
end;
run;
I will get this in my log:
NOTE: There were 3 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.STRANGE_LOG2 has 3 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
So why it's written in the first case
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
390:12
and not in the second case ?
Why there is this note, even if the process will never go into the
else if vtype(age) eq "C" then do;
test=age;
end; ?????
because age is numeric.
It's very important because i'm currently working for a big pharma and it's strictly
forbidden to have the note "Numeric values have been converted to character values.." in the log.
Could you help me please ?
Thank you for your answers.