From the course: SAS® 9.4 Cert Prep: Part 11 Creating and Using Custom Formats
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Demo: Creating and using custom formats - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 11 Creating and Using Custom Formats
Demo: Creating and using custom formats
- [Narrator] In this example, we'll use the format procedure to create a custom numeric and character format based on single values as well as a range of values. To begin with, I have a proc format step here. In the value statement, I'm creating a numeric format named stdate. And this is actually based on date values. You'll notice I'm using the keyword low to build a range from whatever the oldest date is up to, and including, December 31st, 1999, and assigning a corresponding label. We're building two other ranges, as well, and, finally, providing a label for missing values. So, next I'd like to create another custom format. And I'll do that with an additional value statement in the proc format step. In this value statement, I want to build a character format named $region. This format will group the basin codes into the various oceans. So, the first raw value will simply be the string capital NA. And the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.