I've just learned PROC FCMP from this page:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003181727.htm
The function works fine locally, so I wonder if I can use this proc remotely. In my point of view, as long as I change the output library for this function, it could be used in remote server. Here's my code:
proc fcmp outlib=rwork.funcs.trial;
function study_day2(intervention_date, event_date);
n = event_date - intervention_date;
if n >= 0 then
n = n + 1;
return (n);
endsub;
options cmplib=rwork.funcs;
run;
rsubmit;
data _null_;
start = '15Feb2008'd;
today = '27Mar2008'd;
sd = study_day2(start, today);
put sd=;
run;
endrsubmit;
For the 1st section, I get a notice that the function has been saved in the RWORK library:
NOTE: Function study_day2 saved to rwork.funcs.trial.
However after running the 2nd section, I get this error:
ERROR 68-185: The function STUDY_DAY2 is unknown, or cannot be accessed.
Is there a way to fix this issue? Thanks!