BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

Can anyone explain in words what this proc format is doing?

May show a practical example when we can use it?

proc format;
picture show (round)
0-high = 99.99
low - <0=099.99 (prefix='-')
;
run;
1 REPLY 1
PaigeMiller
Diamond | Level 26

It is displaying a positive number (rounded off) as two digits (one or both of them could be a leading zero) before the decimal and two digits after the decimal. If the number is less than zero, there can be three digits, a minus sign and no leading zero.

 

proc format;
picture show (round)
0-high = 99.99
low - <0=099.99 (prefix='-')
;
run;
data example;
    x1=8.03;
    x2=8.037;
    x3=-1.90;
    format x1-x3 show.;
run;  

 

--
Paige Miller

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
  • 1 reply
  • 370 views
  • 0 likes
  • 2 in conversation