SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
keen_sas
Quartz | Level 8

Hi All ,

1) The below sample code works perfectly with PROC report  to display the symbols alpha and beta  using ther unicodes, but the same macro variables are unable to resovle in the report if we create using data _null_using  PUt statement

ods escapechar="^";

%let alpha = ^{unicode 03B1};
%let beta = ^{unicode 03B2};

data have;
    length x y $ 20;
    x="&alpha";
    y="&beta";
run;

ods listing close;
ods rtf file="path\report.rtf";
proc report data = have nowindows;
    title &alpha β
    define x/"name &alpha" width=20;
    define y/"name &beta" width=20;
    footnote "symbol=&alpha and &beta";
run;
ods rtf close;
ods listing;

code that does not display special symbols using PUT statement in data _null_
data _null_ ;
file print ;
  set have ;
   put @10 "&alpha.          &beta.";
   put @10 "X"  @15 "Y" ;
run ;

can anyone suggest what needs to be modifed to display the symbols alpha and beta in this code.

2) Also suggest how to dispaly super script -1 in reports  using UNICODE or any other method .

3) Any suggestion how to display Δ this symbol in report .

Thanks in advance  for your suggestions .

2 REPLIES 2
data_null__
Jade | Level 19


http://support.sas.com/documentation/cdl/en/odsug/65308/HTML/default/viewer.htm#p11xia2ltavr8ln17srq...

ods escapechar="^";

%let alpha = ^{unicode 03B1};
%let beta = ^{unicode 03B2};
%let delta= ^{unicode 0394};



data have;
    length x y $ 20;
   
x="&alpha";
    y=
"&beta";
    z=
"delta";
run;





ods listing close;
ods rtf file="~/report.rtf";
proc report data = have nowindows list;
   
title &alpha &beta δ
    define x/"name &alpha" width=20;
   
define y/"name &beta" width=20;
   
define z/"name &delta" width=20;
   
footnote "symbol=&alpha and &beta ^{super -1} &delta";
run;
ods rtf close;
art297
Opal | Level 21

As far as displaying an uppercase delta in proc report will the following provide what you want?:

^{unicode 0394};


sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 10066 views
  • 1 like
  • 3 in conversation