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;
Using <- in
low <- -5000 = '<-5000
is the problem. Which value starts the range, if you exclude the lowest value?
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;
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!
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.
Ready to level-up your skills? Choose your own adventure.