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-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

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
  • 521 views
  • 0 likes
  • 2 in conversation