<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help in resolved unicode in macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587227#M167701</link>
    <description>&lt;PRE&gt;title "subject is (*ESC*){unicode 2265} 1";


proc report data=sashelp.class nowd;
define name/style={tagattr="wrap:no"};
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 279px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32323i215F6F7C17EDEA8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2019 13:33:46 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-09-09T13:33:46Z</dc:date>
    <item>
      <title>Help in resolved unicode in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587109#M167637</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a macro i am trying to resolve the following unicode value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods escapechar='^';&lt;BR /&gt;%let title_1=%str(subject have ^{unicode 2265}1);&lt;/P&gt;
&lt;P&gt;title=%sysfunc(tranwrd(%superq(title_1),|,%str(\par )));&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;the resolved value of &lt;FONT color="#FF6600"&gt;title&lt;/FONT&gt; variable should be =subject have ≥1&lt;/P&gt;
&lt;P&gt;but the resolved value of &lt;FONT color="#FF6600"&gt;title&lt;/FONT&gt; is=subject have ^{unicode 2265}1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error i am getting is&amp;nbsp;&lt;FONT color="#FF6600"&gt;Literal contains unmatched quote.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Please suggest how to resolve this.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 23:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587109#M167637</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2019-09-08T23:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help in resolved unicode in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587118#M167645</link>
      <description>&lt;P&gt;Do you mean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let title=%sysfunc(tranwrd(%superq(title_1),|,%str(\par )));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;because the statement doesn't mean anything without the %let.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any event, you have not done anything to resolve the value of the macro variable &amp;amp;title, you are simply assigning text to the macro variable &amp;amp;title, so it should not (yet) be resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use &amp;amp;title in a SAS command, such as the TITLE statement, then it should resolve&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "&amp;amp;title";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What happens in that case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are problems, please turn on the options SYMBOLGEN MLOGIC and MPRINT, run it again and show us the SAS log (the entire log, not just the error messages).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 00:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587118#M167645</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-09T00:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help in resolved unicode in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587119#M167646</link>
      <description>&lt;P&gt;The syntax to use Unicode characters varies wildly, depending on where in SAS one uses them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS/GRAPH titles require a different syntax than SAS/GRAPH legends, which is again different from what ODS Graphs understands,&amp;nbsp;which is also different from what ODS reports need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a summary of my findings. I am just displaying an exponent here, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Graph&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper lia-message-image-actions-narrow lia-message-image-actions-below"&gt;&lt;IMG class="lia-media-image" src="https://communities.sas.com/t5/image/serverpage/image-id/19438i14C823B0C33A8A55/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capturegrp.PNG" title="Capturegrp.PNG" /&gt;&lt;I class="lia-fa lia-fa-search-plus lia-media-lightbox-trigger" aria-label="Enlarge image"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTML&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper lia-message-image-actions-narrow lia-message-image-actions-below"&gt;&lt;IMG class="lia-media-image" src="https://communities.sas.com/t5/image/serverpage/image-id/19439iA0BE4DCC99DCABCD/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capturehtml.PNG" title="Capturehtml.PNG" /&gt;&lt;I class="lia-fa lia-fa-search-plus lia-media-lightbox-trigger" aria-label="Enlarge image"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDF&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG class="lia-media-image" src="https://communities.sas.com/t5/image/serverpage/image-id/19440i195FC62E67EE3A17/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capturepdf.PNG" title="Capturepdf.PNG" /&gt;&lt;I class="lia-fa lia-fa-search-plus lia-media-lightbox-trigger" aria-label="Enlarge image"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RTF&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG class="lia-media-image" src="https://communities.sas.com/t5/image/serverpage/image-id/19441iAFBD7C617EF4D25C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capturertf.PNG" title="Capturertf.PNG" /&gt;&lt;I class="lia-fa lia-fa-search-plus lia-media-lightbox-trigger" aria-label="Enlarge image"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS Graphs seem to behave differently than when I last tested these syntaxes. Oh well...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;title;
 
%***************** SAS/GRAPH **********;
%let a=%sysfunc(unicodec(TRT A 5x10, utf16b),$hex40.)00b92070;
%let b=%sysfunc(unicodec(TRT B 1x10, utf16b),$hex40.)00b900b9;
%put &amp;amp;=a ;%put &amp;amp;=b;
legend value=(font="arial unicode ms/unicode" "&amp;amp;a"x "&amp;amp;b"x) ;
axis   value=(font="arial unicode ms/unicode" "&amp;amp;a"x "&amp;amp;b"x 
              font="arial" /* for GIF for next values on axis*/);
        
goptions ypixels=200 xpixels=320 dev=gif;
title1 h=1 font="arial unicode ms" "TRT A 5x10^{super 10}" ;* no /unicode;
title2 h=1 font="arial unicode ms" "TRT B 1x10^{super 11}" ;* for title!;
proc gplot data=SASHELP.CLASS;
  plot WEIGHT*AGE=SEX/legend=legend1 haxis=axis1;
  note c=black f='arial unicode ms/unicode' m=(20,50)pct h=3 "&amp;amp;a"x;
  note c=black f='arial unicode ms/unicode' m=(20,40)pct h=3 "&amp;amp;b"x;
  run;
quit; 
 
goptions dev=actximg;
title;
proc gplot data=SASHELP.CLASS;
  plot WEIGHT*AGE=SEX/legend=legend1 haxis=axis1;
  run;
quit; 
 
 
%***************** ODS GRAPH **********;
proc format ;
  value $sup_sg
    'F'="TRT A 5x10(*ESC*){unicode '00b9'x}(*ESC*){unicode '2070'x}"
    'M'="TRT B 1x10(*ESC*){unicode '00b9'x}(*ESC*){unicode '00b9'x}" ;
ods graphics on / width=620px height=400px;
proc sgpanel data=SASHELP.CLASS;
  format SEX $sup_sg.;
  panelby SEX / novarname headerattrs=GraphUnicodeText;
  scatter x=WEIGHT y=HEIGHT;
run;
 
 
%***************** ODS REPORT **********;
ods escapechar='^' noproctitle;
proc format ;
  value $sup_ods 'F'="TRT A 5x10^{super 10}"
                 'M'="TRT B 1x10^{super 11}" ;
proc freq data=SASHELP.CLASS;
  format SEX $sup_ods.;
  table SEX;
run;       
 
 
data TEST;
  X="TRT A 5x10^{super 10}";
run;
 
title "TRT A 5x10^{super 12}";
 
ods rtf file="%sysfunc(pathname(WORK))\test.rtf" ;
ods pdf file="%sysfunc(pathname(WORK))\test.pdf" ;
ods html file="%sysfunc(pathname(WORK))\test.html" ;
ods excel file="%sysfunc(pathname(WORK))\test.xls" ;
proc print data=TEST noobs;
run;
ods _all_ close;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 00:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587119#M167646</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-09-09T00:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help in resolved unicode in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587227#M167701</link>
      <description>&lt;PRE&gt;title "subject is (*ESC*){unicode 2265} 1";


proc report data=sashelp.class nowd;
define name/style={tagattr="wrap:no"};
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 279px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32323i215F6F7C17EDEA8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 13:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-resolved-unicode-in-macro-variable/m-p/587227#M167701</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-09T13:33:46Z</dc:date>
    </item>
  </channel>
</rss>

