Formatting Data Values

Temporarily Assigning Formats to Variables

In your SAS reports, formats control how the data values are displayed. To make data values more understandable when they are displayed in your procedure output, you can use the FORMAT statement, which associates formats with variables.
Formats affect only how the data values appear in output, not the actual data values as they are stored in the SAS data set.
General form, FORMAT statement:
FORMAT variable(s) format-name;
where
  • variable(s) is the name of one or more variables whose values are to be written according to a particular pattern
  • format-name specifies a SAS format or a user-defined format that is used to write out the values.
    The FORMAT statement ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.