2

How do I make the label for a variable display a Greek character.

So I need:

label Theta = <somehex_expression?>;

I'm trying to label the variable named Theta with the upper case Greek theta symbol. thoughts?

flag

1 Answer

3

As far as I can gather you can pretty much assign any character to a SAS label. It's more a case of whether SAS will display the expected character back to you, or if it will substitute it with a question mark instead. From some very quick tests I could only get SAS labels to display correctly with the ASCII characters 0-255. If your greek letter is in that list then you're golden. If not then I think it may be a problem. I know the top 255 will display correctly as the label both when you print the dataset and open it for browsing. Good luck.

**
** PRINT LIST OF AVAILABLE ASCII CHARACTERS
*;
data _null_;
  do i = 0 to 255;
    ascii_symbol = byte(i);
    put i ascii_symbol;
  end;
run;

**
** CREATE A TABLE WITH AN ASCII LABEL AND 
** PRINT IT ENSURING THE LABEL IS SHOWN.
*;
data x;
  label y = "%sysfunc(byte(240))";
  y = "blah";
run;

proc print data=x label;
run;
link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.