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

Hello,

A dataset has a numeric column with values 0, 1, 2, 3.

I would like to print these numbers with a "€" prefix. so my code is

proc format ; picture Format_Year_Suite low-high = '0' (prefix='€ ') ; run;

proc print data=BEH_INDIC_7 ;

var Suite_Year_4_Sort ;

format Suite_Year_4_Sort Format_Year_Suite. ;

run ;

 

It works for all numbers execpt 0 which is not displayedCapture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
naveenraj
Quartz | Level 8

When you specify zero as the digit selector, any leading zeros in the number to be displayed are shown as blanks

 

proc format ; picture Format_Year_Suite low-high = '9' (prefix='€ ') ; run;

This should work for you 

View solution in original post

4 REPLIES 4
naveenraj
Quartz | Level 8

When you specify zero as the digit selector, any leading zeros in the number to be displayed are shown as blanks

 

proc format ; picture Format_Year_Suite low-high = '9' (prefix='€ ') ; run;

This should work for you 

Nasser_DRMCP
Lapis Lazuli | Level 10

thanks a lot naveenraj. but whenever there are more than 10 years, 10 is diplayed N + 0 (N + 10 intended), 11 is displayed N + 1 (N + 11 intended)...

Nasser_DRMCP
Lapis Lazuli | Level 10

great ! thanks for your quick and reliable response

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