BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

What is wrong with this proc format code??

 

I get an error

4917 low <- -5000 = '<-5000'
-
22
200
ERROR 22-322: Syntax error, expecting one of the following: (, ',', -, =.
ERROR 200-322: The symbol is not recognized and will be ignored.

 

proc format;
value ffmt
. = 'Missing'
low <- -5000 = '<-5000'
-5000 <- 0 = '[-5000,0)'
0 <- 1000 = '[0, 1000)'
1000 <- 5000 = '[1000 , 5000)'
5000 <- 10000 = '[5000, 10000)'
10000<-high='>10000';
run;

2 REPLIES 2
andreas_lds
Jade | Level 19

Using <- in

low <- -5000 = '<-5000

 is the problem. Which value starts the range, if you exclude the lowest value?

Jagadishkatam
Amethyst | Level 16

I updated the format low - -5000 by removing the < and it works, please check.

 

proc format;
value ffmt
. = 'Missing'
low - -5000 = '<-5000'
-5000 <- 0 = '[-5000,0)'
0 <- 1000 = '[0, 1000)'
1000 <- 5000 = '[1000 , 5000)'
5000 <- 10000 = '[5000, 10000)'
10000<-high='>10000';
run;

Thanks,
Jag

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 633 views
  • 0 likes
  • 3 in conversation