Base SAS Programming – Day 9

Looping in SAS

  1. Functions in SAS:  Continued
    • Text function:
      •  Compress – Returns a character string with specified characters removed from the original string
      • Index – Returns the position of the specific character in a string
    • Use of upcase, lowcase and propcase functions in string comparison
    • Math / Stat functions: Like Int, Round, Sum, Mean etc
    • Difference between Mean value (or any aggregate function) of Proc Means / Summary and Mean function
  2. Loops in SAS : Do Loops
    • Loops are used to iterate through every observation for specified number of times to obtain a desired result
    • Types of Loops:
      • Do Loop
      • Do While
      • Do Until
    • Default increments by 1
    • Can use BY to increment by any value other than 1


Leave a Reply

Your email address will not be published.