DATA Step, Macro, Functions and more

proc format error

Reply
New User
Posts: 1

proc format error

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;

 

Super User
Posts: 3,778

Re: proc format error

proc format;
value cl 1-2 = 'high'
             3-5 = 'medium'
             6-7 = 'low'
;
run;
Super User
Super User
Posts: 7,860

Re: proc format error

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' ;
Contributor
Posts: 37

Re: proc format error

Hi,

 

you can try 

 

 

proc format;

picture 1-2 = 'High'

          3-5='Medium'

          6-7='Low';

run;

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 91 views
  • 0 likes
  • 4 in conversation