I have just started using proc FCMP and I am interested if it is possible to have the functions perform some basic checks to make them robust.
For instance, if I supply a variable that does not exist in the PDV to a regular base SAS function such as int(x), or even just y = x where x is not in the PDV, I get the message NOTE:...uninitialized... but if I create a new function in proc FCMP I can't seem to recreate this behaviour.
Using the function in a where clause errors just as the SAS function would, so there it is ok.
Can anyone shed any light on why the uninitialized note would not be produced? Or better yet if there is a way of producing this note in a user defined function.
Yeah, this is funny. I don't think there is anything us, users, can do about it, though. I suspect that by the time your fcmp function executes, it has already received a missing value and that's it, since the arguments are passed as values by default. As far as I know, that is. :-)
proc fcmp outlib=work.func.test;
%let cmplib = %sysfunc(getoption(cmplib));
options cmplib = (&cmplib work.func);
ans = isOne(v);
options cmplib = (&cmplib);
/* expected an "uninitialized" NOTE for the variable v, but no log messages at all */