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

Hi Can anyone help me understanding in how PICTURE FORMAT works?

I have following code, but it's formatting 1 million and 10 millions as same and mistaking bigger numbers -

proc format;

picture mill

0-high = ' 000.9M' (prefix='EUR ' mult=.000001);

run;

data _temp_;

input x ;

datalines;

1000000

10000000

100000000

1000000000

;

run;

data y;

set _temp_;

y = put(x,mill.);

run;

 

Output:

1000000      EUR 1M
10000000    EUR 1.0M
100000000   EUR 10.0M
1000000000  EUR 100.0M

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

From the documentation of the multiplier= option:

picture million low-high='09.9M'
        (prefix='$' mult=.00001);

So your code should be

proc format;
picture mill
  0-high = ' 009.9M' (prefix='EUR ' mult=.00001)
;
run;

The documentation will also tell you why this needs to be so.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

From the documentation of the multiplier= option:

picture million low-high='09.9M'
        (prefix='$' mult=.00001);

So your code should be

proc format;
picture mill
  0-high = ' 009.9M' (prefix='EUR ' mult=.00001)
;
run;

The documentation will also tell you why this needs to be so.

thepushkarsingh
Quartz | Level 8
Many thanks

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1386 views
  • 0 likes
  • 2 in conversation