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
Example 6: Using the SUBROUTINE Statement with a CALL Statement
Details
The following is an example of the SUBROUTINE statement. The SUBROUTINE
statement creates an independent computational block of code that can be used with a
CALL statement.
Program
proc fcmp outlib=sasuser.funcs.temp;
subroutine inverse(in,inv) group="generic";
outargs inv;
if in=0 then inv=.;
else inv=1/in;
endsub;
options cmplib=sasuser.funcs;
data _null_;
x=5;
call inverse(x, y);
put x= y=;
run;
Log
Log 21.8 Results from Using the SUBROUTINE Statement in PROC FCMP
x=5 y=0.2
Example 7: Using Graph Template Language (GTL) with User-Defined
Functions
Features: PROC FCMP functions
OSCILLATE ...
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