Help using Base SAS procedures

Proc Format Range Overlap Error

Reply
N/A
Posts: 1

Proc Format Range Overlap Error

With the following code I get the below error.

proc format;
value $tmpRNG
0 = "0 only"
0<-5 = "1-5"
10<-15 = "11-15"
15<-20 = "16-20"
20<-25 = "21-25"
25<-30 = "26-30"
30<-35 = "31-35"
35<-40 = "36-40"
40<-45 = "41-45"
45<-50 = "46-50"
50<-55 = "51-55"
55<-60 = "56-60"
60<-65 = "61-65"
65<-70 = "66-70"
70<-75 = "71-75"
75<-80 = "76-80"
80<-85 = "81-85"
85<-90 = "86-90"
90<-95 = "91-95";
run;


14 proc format;
15 value $tmpRNG
16 0 = "0 only"
17 0<-5 = "1-5"
19 10<-15 = "11-15"
20 15<-20 = "16-20"
21 20<-25 = "21-25"
22 25<-30 = "26-30"
23 30<-35 = "31-35"
24 35<-40 = "36-40"
25 40<-45 = "41-45"
26 45<-50 = "46-50"
27 50<-55 = "51-55"
28 55<-60 = "56-60"
29 60<-65 = "61-65"
30 65<-70 = "66-70"
31 70<-75 = "71-75"
32 75<-80 = "76-80"
33 80<-85 = "81-85"
34 85<-90 = "86-90"
35 90<-95 = "91-95";
ERROR: These two ranges overlap: 0<-5 and 10<-15 (fuzz=0).
NOTE: The previous statement has been deleted.
37 run;


If i comment out the line, 0<-5 = "1-5", it all works fine but if I uncomment out the other two lines I get errors. Did I type somethig in wrong?

Thanks.
Timothy Message was edited by: bigman
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Format Range Overlap Error

You are attempting to create a SAS CHARACTER format and so you cannot code a value range.

Also, when posting code, you should keep in mind the information in the post below (suggest bookmarking the page/link for future reference):

http://support.sas.com/forums/thread.jspa?messageID=27609


Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 599 views
  • 0 likes
  • 2 in conversation