BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I want to create format

What is the way to solve the problem with category

30000<50000='(d) 30-50'

Please note that it should be greater than 30000 and lower than 50000

proc format;
value fff
0='(a) 0'
0<-10000='(b) 0-10'
10000<-30000='(c) 10-30'
30000<50000='(d) 30-50'
50000='(e) 50'
50000<-high='(f) 50+'
;
run;

 

1 REPLY 1
Kurt_Bremser
Super User

To exclude both endpoints, use <-<:

proc format;
value fff
0='(a) 0'
0<-10000='(b) 0-10'
10000<-30000='(c) 10-30'
30000<-<50000='(d) 30-50'
50000='(e) 50'
50000<-high='(f) 50+'
;
run;

data test;
input number;
numberf = number;
format numberf fff.;
datalines;
29000
30000
30001
49999
50000
50001
;
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
  • 1 reply
  • 550 views
  • 2 likes
  • 2 in conversation