Skip to Main Content
Base SAS 9.4 Procedures Guide, Third Edition
book

Base SAS 9.4 Procedures Guide, Third Edition

by SAS Institute
August 2014
Intermediate to advanced content levelIntermediate to advanced
2218 pages
209h 16m
English
SAS Institute
Content preview from Base SAS 9.4 Procedures Guide, Third Edition
Examples: FCMP Procedure
Example 1: Creating a Function and Calling the Function from a DATA
Step
Features: PROC FCMP statement option
OUTLIB=
DATA step
Details
This example shows how to compute a study day during a drug trial by creating a
function in PROC FCMP and using that function in a DATA step.
Program
proc fcmp outlib=sasuser.funcs.trial;
function study_day(intervention_date, event_date);
n=event_date - intervention_date;
if n >= 0 then
n=n + 1;
return(n);
endsub;
options cmplib=sasuser.funcs;
data _null_;
start='15Feb2010'd;
today='27Mar2010'd;
sd=study_day(start, today);
put sd=;
run;
Program Description
Specify the name of an output package to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Base SAS 9.4 Procedures Guide, Second Edition

Base SAS 9.4 Procedures Guide, Second Edition

SAS Documentation
Oracle® Database 10g Insider Solutions

Oracle® Database 10g Insider Solutions

Arun Kumar R., John Kanagaraj, Richard Stroupe

Publisher Resources

ISBN: 9781629593043