- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 02-12-2018 08:06 PM
(1322 views)
I am trying to create a format for a variable cl with particular values but SAS gives me the following error:
Expecting a ' , '
Here is my code:
proc format;
value cl 1-2 = 'high'
3-4-5 = 'medium'
6-7 = 'low'
;
run;
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc format;
value cl 1-2 = 'high'
3-5 = 'medium'
6-7 = 'low'
;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Either list the individual values separated by commas.
value cl 1,2 = 'high' 3,4,5 = 'medium' 6,7 = 'low' ;
Or use hyphens to specify ranges
value cl 1-2 = 'high' 3-5 = 'medium' 6-7 = 'low' ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can try
proc format;
picture 1-2 = 'High'
3-5='Medium'
6-7='Low';
run;