Hi!
I'm dealing with some troubles.
Data have;
Input x1 x2;
Cards;
1 1
2 110
3 30
4 1010
5 20
6 3201
7 306
8 423
9 70912
;
Run;
Proc Format;
value scalesss
LOW -< 100 = 'more than 100'
100 -< 1000 = 'less than 1000'
1000 -< 10000 = 'less than 10000'
10000 -< 50000 = 'less than 50000'
50000-HIGH = 'more than 200000'
;
Run;
Data have2;
Set have;
format x2 scalesss;
Run;
I thought using format in Data was fine.
Did I miss something here?
It keeps saying something like, "printing type scalesss should be ended with numeral. this printing type is incorrect"(I got this note in Korean version, so not sure what English version should say).
Thank you for checking!
get your vision(eyesight) checked lol
spelling
Data have;
Input x1 x2;
Cards;
1 1
2 110
3 30
4 1010
5 20
6 3201
7 306
8 423
9 70912
;
Run;
Proc Format;
value scalesss
LOW -< 100 = 'more than 100'
100 -< 1000 = 'less than 1000'
1000 -< 10000 = 'less than 10000'
10000 -< 50000 = 'less than 50000'
50000-HIGH = 'more than 200000'
;
Run;
Data have2;
Set have;
format x2 scalesss.;/*correction*/
Run;
get your vision(eyesight) checked lol
spelling
Data have;
Input x1 x2;
Cards;
1 1
2 110
3 30
4 1010
5 20
6 3201
7 306
8 423
9 70912
;
Run;
Proc Format;
value scalesss
LOW -< 100 = 'more than 100'
100 -< 1000 = 'less than 1000'
1000 -< 10000 = 'less than 10000'
10000 -< 50000 = 'less than 50000'
50000-HIGH = 'more than 200000'
;
Run;
Data have2;
Set have;
format x2 scalesss.;/*correction*/
Run;
Thanks again!
actually spelling was just a typo...
And thanks to your correction, I found that I missed the dot in my original code.
Thank you for enlightening!
You didn't spell the format properly.
Data have2;
Set have;
format x2 scalesss.;
Run;
Thank you for the checkup.
ss was typo, and I missed the dot in the original code.
God, it's hard to following with a book!
I should check descriptions harder.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.