BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ronein
Meteorite | Level 14

Hello

Why this proc format has a problem?

I want that 350000 has a separate group.

I  want that between 300000 (not included) and 350000 (not included) has a separate group too.

The error is:

162 300000<350000='(8) 300-350'
______
22
76

 


proc format;
value FFF
0="(1) 0"
0<-50000='(2) 0-50'
50000<-100000='(3) 50-100'
100000<-150000='(4) 100-150'
150000<-200000='(5) 150-200'
200000<-250000='(6) 200-250'
250000<-300000='(7) 250-300'
300000<350000='(8) 300-350'
350000='(9) 350000'
;
Run;
1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
Kurt_Bremser
Super User

You always need a hyphen in the range. The angled bracket is used to exclude the edge value. To exclude both edges, use

300000<-<350000='(8) 300-350'

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 273 views
  • 1 like
  • 2 in conversation