SAS Institute. The Power to Know
close window

SAS Functions by Example


This course covers many useful functions that can solve everyday problems quickly and efficiently and that are not discussed in other programming courses. It is ideal for anyone who programs in Base SAS, especially DATA step programming.

Learn how to

  • save time with character functions, including some amazing new functions
  • use date and time functions, including the mysterious Date Interval functions
  • save time with array functions
  • program using descriptive statistics functions, including new functions such as SMALLEST and LARGEST
  • use mathematical and special functions (including the mysterious PUT and INPUT functions)
  • generate random numbers using functions
  • search for text patterns with Perl regular expression functions
  • incorporate the new CALL SORTN and CALL SORTC routines.

Who should attend

SAS programmers

Duration:  2 days

To Register

I am attending SAS Global Forum conference. Register Now
I am not attending the conference but would like to register for this course. Register Now
Before attending this course, participants should have completed the SAS Programming 1: Essentials course. Completion of the SAS Programming 2: Data Manipulation Techniques course is also recommended or, alternatively, a minimum of one year of SAS programming experience.

This course addresses Base SAS software.

Character Functions Part 1

  • storage length of character variables
  • functions that change case
  • functions that extract and search for strings
  • functions that join strings
  • functions that remove blanks from strings or take strings apart
  • functions that count substrings or characaters
Character Functions Part 2

  • the ANY and NOT functions
  • functions that replace words or characters
  • functions that compare strings
Date and Time Functions

  • SAS date functions
  • SAS time functions
  • SAS datetime functions
  • SAS interval functions
Array functions

  • the DIM function
  • array boundaries and the related functions
  • temporary arrays
Descriptive Statistics Functions

  • functions that count missing and nonmissing values for SAS variables
  • functions that compute descriptive statistics
  • functions that determine the ordering of data values
Special Truncation and Mathematical Functions

  • special functions
  • functions to obtain values from previous functions
  • truncation functions
  • commonly used mathematical functions
Random Number Functions

  • uniform random numbers
  • randomly generated data sets
  • selecting random subsets of a SAS data set
  • random assignments of subjects
  • random number call routine
Variable Information Functions

  • selected V functions
Perl Regular Expresssion Functions

  • writing regular expressions
  • the PRX functions
This course description was created using SAS software. BFEX