Format statement
The Format statement tells SAS how to print a variable.
If used in the Data step, the format is permanently associated with the variable.
If used in the Proc step, the format is temporarily associated with the variable (only for the duration of the Proc)
Format statement
variable-name(s) format ; |
for more information see SL:R, Chapter 9, SAS Language Statements
Format
|
Example:
FORMAT income DOLLAR8.;
Note: the period. A period (.) is required
For more information see
SL:R, Chapter 3, Components of the SAS Language, SAS Formats and SL:R, Chapter 14, SAS Formats
Note also that example 8 reads parts of the data more than once.