| Formatting Variable Values |
| Creating User-Defined
Formats |
You can define several formats by using multiple VALUE statements in
a single PROC FORMAT step. In this example, each VALUE statement defines
a different format.
proc format lib=library;
value JobFmt
103='manager'
105='text processor'
111='assoc. technical writer'
112='technical writer'
113='senior technical writer';
value $Respnse
'Y'='Yes'
'N'='No'
'U'='Undecided'
'NOP'='No opinion';
run;
Now that you have defined the JobFmt format for displaying the values of
|
| FirstName | LastName | JobTitle | Salary |
| Donny | Evans | technical writer | 29996.63 |
| Lisa | Helms | text processor | 18567.23 |
| John | Higgins | 25309.00 | |
| Amy | Larson | senior technical writer | 32696.78 |
| Mary | Moore | technical writer | 28945.89 |
| Jason | Powell | manager | 35099.50 |
| The SAS log prints a note informing you that the format has been created. |
SAS Log
01 proc format lib=library;
02 value JobFmt
03 103='manager'
04 105='text processor'
05 111='assoc. technical writer'
06 112='technical writer'
07 113='senior technical writer';
NOTE: Format JobFmt has been output.
08 run;
|
![]() ![]() |
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.