Modifying Numeric Values with Functions

Introduction to Modifying Numeric Values

You've seen how SAS functions can be used to
  • convert between character and numeric variable values
  • manipulate SAS date values
  • modify values of character variables.
SAS provides additional functions to create or modify numeric values. These include arithmetic, financial, and probability functions. There are far too many of these functions to explore them all in detail, but let's look at two examples.

INT Function

To return the integer portion of a numeric value, use the INT function. Any decimal portion of the INT function argument is discarded.
General form, INT function:
INT(argument)
where argument is a numeric variable, constant, ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.