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

I have the code and output below. I would like to remove decimal this code produces in column Blg_Mo. Help would be greatly appreciated.

 

compute blg_mo_calc/char;
blg_mo_calc=put(blg_mo,8.);
endcomp;
break after blg_mo / summarize;
compute after blg_mo;
blg_mo_calc = 'SubTotal';
call define (_row_, 'style', 'style=[fontweight=bold background=#B1E599]');
endcomp;


rbreak after / summarize style=[background=cxf0f0f0 fontweight=bold fontsize=12pt];
compute after;
call define ('_c1_', 'style', 'style=[pretext="Grand Total"]');
endcomp;
label blg_mo_calc= 'Blg_Mo';

 

OUTPUT:

sasuser_sk_0-1614026072976.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

That is not a "decimal". That is a MISSING value used in the creation of the character value.

 

Add:

Options missing=' ';

prior to proc report so the missing value is a space.

Reset afterwards to the default using

Options missing=' ';

 

OR write a custom format for the column that displays missing as a space instead of 8. in that PUT.

View solution in original post

2 REPLIES 2
ballardw
Super User

That is not a "decimal". That is a MISSING value used in the creation of the character value.

 

Add:

Options missing=' ';

prior to proc report so the missing value is a space.

Reset afterwards to the default using

Options missing=' ';

 

OR write a custom format for the column that displays missing as a space instead of 8. in that PUT.

sasuser_sk
Quartz | Level 8

Thank you!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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