O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required