When we program in any language it is desirable to use short variable labels and short names in text variables, e.g. we would use treat or treatment as our variable instead of 'type of pressure treatment', which would be more informative. The treatments would be called A and B , or 1 and 2, instead of describing which kind of treatment it is. In tables and graphs we would however like to have more information. Then in SAS we can use formats and labels.
- Date formats and informats: To read and express dates
- Text and character informats: To read text variables to SAS
- Some other formats
- LABEL: to set more informative names on variables
- PROC FORMAT: to give more informative text within the dataset
Formats in data and proc steps:
If you use the format statement in a procedure like procedure print it is valid only in this step. If you print the data again later without the format statement you will see the date variable again as number and the variables again have their actual values.
If you use the format statement in a data step the format is permanent and will follow your dataset.