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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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