Custom Function
In release 9.2 you can write your own custom functions.
Here's a sample how.
/*
Custom Function (vanaf SAS 9.2)
*/
proc fcmp outlib=sasuser.funcs.trial;
function std (intervention_day, event_day);
if event_date < intervention_day then
return(event_date - intervention_date);
else
return (event_date - intervention_date + 1);
endsub;
run;
options cmplib = sasuser.funcs.trial;
data _null_;
start = '15Feb2006'd;
today = '27Mar2006'd;
sd = std(start, today);
put sd=;
run;
page_revision: 0, last_edited: 1193399903|%e %b %Y, %H:%M %Z (%O ago)





