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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

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;

View solution in original post

4 REPLIES 4
novinosrin
Tourmaline | Level 20

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;
MonoLight
Obsidian | Level 7

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!

SuryaKiran
Meteorite | Level 14

You didn't spell the format properly.

Data have2;
Set have;
format x2 scalesss.;

Run;

 

Thanks,
Suryakiran
MonoLight
Obsidian | Level 7

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 1651 views
  • 1 like
  • 3 in conversation