Using the Newly Defined Function

You must specify the CMPLIB= system option in order to use the new function in a DATA step or supported PROC step. The CMPLIB= system option specifies one or more data sets that store user-defined functions. In this example, function ReverseName is saved to orion.functions.
options cmplib=orion.functions;
The function ReverseName is called in the following code.
options cmplib=orion.functions;
data work.emplist;
    set orion.employeeaddresses;
    NewName=ReverseName(EmployeeName);
run;

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.