Basic SAS Functions in Version 8.2
Kim Michalski, Office of the Actuary, Baltimore, MDRick Andrews, Office of Research, Development, and Information, Baltimore, MD
This is a presentation created to provide new users with some basic functions used within the SAS system.
SAS has over 300 functions. This article identifies and explains, with worked examples, twenty functions that beginners might find very useful. The functions are grouped into:
- Numeric Truncation: CEIL, FLOOR, INT, ROUND
- Descriptive Statistics: SUM, MEAN, MIN, MAX
- Character: SCAN, LEFT, RIGHT, SUBSTR, INDEX, (and mentions TRIM)
- Conversion: INPUT, PUT (Discusses YEARCUTOFF option too.)
- Date and Time: INTCK, INTNX, YRDIF (and uses TODAY)
Although these functions are not going to be everyone's Top 20 favourites, they do serve as a staring point for exploring the power and scope of functions in SAS.
Note; Although the presentation was written for SAS version 8.2, these functions and the examples still work the same way in SAS version 9.3