Return to Snippet

Revision: 8660
at October 2, 2008 13:44 by webonomic

Initial Code
proc fcmp outlib=sasuser.funcs.trial;

 Note about code 	

   function study_day(intervention_date, event_date);

 Note about code 	

   if event_date < intervention_date then
      return(event_date - intervention_date);
      return(event_date - intervention_date + 1);

 Note about code 	

options cmplib=sasuser.funcs.trial;

 Note about code 	

data _null_;
   start = '15Feb2006'd;
   today = '27Mar2006'd;
   sd = study_day(start, today);

 Note about code 	

   put sd=;

 Note about code 	


Initial URL

Initial Description

Initial Title
Proc FCMP Creating a Function and Calling the Function from a DATA Step

Initial Tags

Initial Language