As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
%SYSFUNC macro function
- This is a work in progress. You are welcome to contribute to this article.
- %SYSFUNC( function(...) <,format> )
- function(...) is the SAS function to be called, complete with parameters.
- <,format> is an optional format for formatting the result of the SAS function.
Because %SYSFUNC is a macro function and is interpreted in the macro processor, the input parameters to the called function are treated as text. While text that represents numeric constants will be converted to numeric input values if that is what the called function requires, nested functions must be enclosed in a nested %SYSFUNC call. Conversely, if the called function expects text or alphanumeric input parameters then the text should not be enclosed in quotes as the quotes will be passed to the called function too.
The results of the function called by %SYSFUNC are returned as text, which can be formatted by an optional format parameter.
%SYSFUNC may raise an ERROR condition when the called function returns a missing value or cannot be evaluated.
ERROR: An error occurred while executing function MAX referenced by the %SYSFUNC or %QSYSFUNC macro function. NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set to a missing value.
- Using Sysfunc to date-stamp data set names
- Using Sysfunc Getoption
- Using sysfunc with intnx
- SYSFUNC and Missing Values
- Using Functions SYSFUNC and IFC to conditionally execute statements in open code
- Converting Characters to Numbers in an FCMP Function