- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
can anyone provide the most efficient/simple syntax to add a degree sign (like for temperature in a vital signs table) to a display colum header in proc report?
thank you, Jill1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Don't know where you want to include it, but you can type it directly. Hold the alt key down and, while you have it depressed, enter 0176 using your numeric keypad, then release the alt key. e.g.: °
Art, CEO, AnalystFinder.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ps( I needed to insert the degree sign in a column heading in a proc report for "Oral Temperature (C)"
I needed to put it before the 'C' (obviously:)
thanks, Jill
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You could also create a macro variable with the degree sign using the byte function as below. You could then use the same macro variable in the column headings where you want to display the degree sign
%let degree=%sysfunc(byte(176));
%put °ree;
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
And for completeness, to insert special symbols into your PROC REPORT or other Headers or Titles, using the ODS ESCAPECHAR Unicode function, you only need to declare you Escape Character (shown as '^' below) and then use the Unicode number for the symbol you want.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ah, thanks, another very concise way to do this. THANKS!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ..do you mind showing me the syntax to include a macro variable the DEFINE stmt? thank you!
DEFINE TEMP / display "Oral Temperature|(°C)"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Which piece of the DEFINE statement would you want to replace with a macro variable?
DEFINE &vaname / display "Oral Temperature|(°C)";
or
DEFINE TEMP/ &usage "Oral Temperature|(°C)";
or
DEFINE TEMP/ display "&label";
or
DEFINE &varname/ &usage "&label";
No matter where you would use macro variable, you'd have to create/assign the values with either a %LET or CALL SYMPUT or using SQL and INTO.
%let varname=TEMP;
%let usage = display;
%let label = %str(Oral Temperature|(°C));
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
all good stuff.
I was trying to add °ree to the display statement label (see below). I wasn't sure if you could add a macro variable directly in to a display statement. now I see it's pretty straightforward. This is how I created the degree macro:
%let degree=%sysfunc(byte(176)); /* degrees */
I guess long and short of it is that I am experimenting with different ways to put a special character in a proc report.
regards, Jill
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do Direct Copy Paste Degree symbol sign