PROC FCMP User-Defined Functions: An Introduction to the SAS Function Compiler
Troy Martin Hughesof resources; business needs must be identified and
discussed, and code must be designed, written, tested,
documented, deployed for use, and ultimately maintained.
To maximize return on investment, software should be
reused as many times as possible, by as many users as
possible, for as long as possible—or at least while it
continues to deliver business value.
To this end, wrapping software functionality inside modular
functions is a rewarding best practice that encourages
software reuse. This software modularity facilitates software
configuration, in which varied inputs (arguments) produce
dynamic output (return values). Configurable modules
replace unnecessary hardcoding, and facilitate repeatable,
reusable software components that can meet the needs of
diverse users and diverse use cases.
The SAS language includes hundreds of built-in functions—
from ABS, which calculates the absolute value of a number,
to ZIPSTATE, which converts a ZIPCODE into its
corresponding state abbreviation. But every programming
language has its limits, and where no built-in function exists
to provide some needed functionality, a user-defined
function can be built to deliver that functionality and
effectively extend the programming language.