Hi all,
I should disclaim all of this by saying that I'm fairly new to SAS programming, so I could be missing something obvious, but I'm having a strange problem with proc fcmp on my SAS 9.1.3 SP 4 server. I'm trying to run the following program:
proc fcmp outlib=work.funcs.comn;
function adw (Theo, Actual, Days);
if Actual > (Theo*0.4) then
return(Actual/Days);
else
return((Theo*0.4)/Days);
endsub;
quit;
options cmplib=work.funcs;
data _null_;
OutAdw = adw(100, 75, 10);
put OutAdw=;
run;
However, I get the error "The function ADW is unknown, or cannot be accessed. From what I read, I thought the options cmplib=work.funcs; would solve that. Can anyone tell me what I'm doing wrong? Here's the full log, just for good measure...
1 proc fcmp outlib=work.funcs.comn;
2 function adw (Theo, Actual, Days);
3 if Actual > (Theo*0.4) then
4 return(Actual/Days);
5 else
6 return((Theo*0.4)/Days);
7 endsub;
8 quit;
NOTE: Function adw saved to catalog work.funcs.comn.
NOTE: PROCEDURE FCMP used (Total process time):
real time 0.26 seconds
cpu time 0.21 seconds
9
10 options cmplib=work.funcs;
11
12 data _null_;
13 OutAdw = adw(100, 75, 10);
---
68
ERROR 68-185: The function ADW is unknown, or cannot be accessed.
14
15 put OutAdw=;
16 run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds