BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

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

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