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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 751 views
  • 0 likes
  • 2 in conversation