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

I have a proc report code that has a ton of code in it but in my define statement I want to say (F/C) or show what columns I am using to divide by. Here is the example of the first part of my code:

proc report nowd data=implant2.finalFI split='/';

columns sys_drg_cd TotalClaims TotalAllowed TotalEPD Total_Claims Total_Allowed Total_EPD perc1 Total_Imp_Claims

Total_Imp_Allowed Total_Imp_EPD perc2 TtlClaims TtlAllowed TtlEPD perc3 Ttl_Claims Ttl_Allowed Ttl_EPD perc4

imp_alloc_allw_amt perc5 imp_epd_calc_allw_amt perc6 perc7;

define sys_drg_cd/group 'DRG Code' missing ;

define totalclaims/group 'Total FI/Claim Frequency/All Claims' center missing;

define totalallowed/group 'Total FI/Allowed Amount/All Claims' format=dollar20.2 center missing;

define Totalepd/group 'Total FI/EPD Amount/All Claims' format=dollar20.2 center missing;

define total_claims/group 'Total FI/Claim Frequency/Implant Claims' center missing;

define total_allowed/group 'Total FI/Allowed Amount/Implant Claims' format=dollar20.2 center missing;

define Total_epd/group 'Total FI/EPD Amount/Implant Claims' format=dollar20.2 center missing;

define perc1/computed format=percent10.2 'FI/Percent of All Claims/(F/C) ' center missing;

compute perc1;

perc1=_c5_/_c2_;

endcomp;

If I put in the () and the / it splits the column because I have defined split. I was trying to figure out how to put in the actual division sign.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ


Hi:

  You can change your split character with split='#' or use some other symbol for the split character. Then your label would be:

define perc1/computed format=percent10.2

      'FI#Percent of All Claims#(F/C)' ;

For the actual division sign (÷), you would either have to cut and paste the symbol into your label and hope that the font for the destination would support that character OR find out what the symbol was in a unicode font and then use the hex code for the symbol with the ESCAPECHAR {UNICODE} function... I think that in a unicode font, the division sign is always unicode 00F7 -- in order to use the {UNICODE} function with a hex value, you must be using SAS 9.2 or higher. And you must use the ODS ESCAPECHAR statement to establish the ESCAPECHAR that you are going to use. If you use this technique, then you should pick a character other than a slash or a # (perhaps a ~ (tilde) or a ^ (caret) ).

All possibly overkill, when just changing the split character would allow you to use the slash to represent division. And, you did not say what your destination of interest was. It is possible that if you cut and pasted the division sign from a document that not all destinations, like LISTING would respect the division sign.

cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ


Hi:

  You can change your split character with split='#' or use some other symbol for the split character. Then your label would be:

define perc1/computed format=percent10.2

      'FI#Percent of All Claims#(F/C)' ;

For the actual division sign (÷), you would either have to cut and paste the symbol into your label and hope that the font for the destination would support that character OR find out what the symbol was in a unicode font and then use the hex code for the symbol with the ESCAPECHAR {UNICODE} function... I think that in a unicode font, the division sign is always unicode 00F7 -- in order to use the {UNICODE} function with a hex value, you must be using SAS 9.2 or higher. And you must use the ODS ESCAPECHAR statement to establish the ESCAPECHAR that you are going to use. If you use this technique, then you should pick a character other than a slash or a # (perhaps a ~ (tilde) or a ^ (caret) ).

All possibly overkill, when just changing the split character would allow you to use the slash to represent division. And, you did not say what your destination of interest was. It is possible that if you cut and pasted the division sign from a document that not all destinations, like LISTING would respect the division sign.

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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