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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 687 views
  • 0 likes
  • 3 in conversation