<?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: Why – is writing as ? in proc report in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Why-is-writing-as-in-proc-report/m-p/521651#M4257</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I copied the text you used in your post.&amp;nbsp; The Excel file contains the dash.&amp;nbsp; Since I was unable to replicate your results I decided to take a look at the hex representation of the value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
a='R – Activate jack';
put a hex20.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log gives this value:&amp;nbsp;&amp;nbsp;52209620416374697661&lt;/P&gt;
&lt;P&gt;The third value is 96 (3rd character), which is the hexadecimal representation of a dash.&amp;nbsp; I recommend that you look at one of your observations that contains the dash and see if you get a hex value of 96 as well.&amp;nbsp; I suspect that maybe you don't have a true dash.&amp;nbsp; Either the encoding of your SAS session or the font being used does not know how to display the value you do have, so you get a question mark.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to modify the data to contain a character that can be displayed properly.&amp;nbsp;&amp;nbsp;If trying to determine what exact character you have seems daunting, you could swap out the character you do have with the UNICODE function, specifying the Unicode value for dash.&amp;nbsp; Simply copy the dash you see in the data and paste it as the second argument in the TRANWRD function.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
a='R – Activate jack';
b = tranwrd(a,'–','^{unicode 2013}');
run;

ods escapechar="^";
ods excel file='test.xlsx';
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Technical Support is a resource.&amp;nbsp; You can submit a track &lt;A href="https://support.sas.com/ctx/supportform/createForm" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;and one of the consultants can help you debug further.&amp;nbsp; Be sure to provide at least one record of data that contains the character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jane&lt;/P&gt;</description>
    <pubDate>Fri, 14 Dec 2018 20:47:37 GMT</pubDate>
    <dc:creator>JaneEslinger</dc:creator>
    <dc:date>2018-12-14T20:47:37Z</dc:date>
    <item>
      <title>Why – is writing as ? in proc report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-writing-as-in-proc-report/m-p/521238#M4177</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a report using Proc report . Everything is working perfectly except the following,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Variable with Observations having "–" (eg:R – Activate jack ) . when I'm export this variable using Proc report to excel, it is writting as "?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one suggest how to get "–" return to output report file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 18:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-writing-as-in-proc-report/m-p/521238#M4177</guid>
      <dc:creator>ashna</dc:creator>
      <dc:date>2018-12-13T18:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why – is writing as ? in proc report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-writing-as-in-proc-report/m-p/521651#M4257</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I copied the text you used in your post.&amp;nbsp; The Excel file contains the dash.&amp;nbsp; Since I was unable to replicate your results I decided to take a look at the hex representation of the value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
a='R – Activate jack';
put a hex20.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log gives this value:&amp;nbsp;&amp;nbsp;52209620416374697661&lt;/P&gt;
&lt;P&gt;The third value is 96 (3rd character), which is the hexadecimal representation of a dash.&amp;nbsp; I recommend that you look at one of your observations that contains the dash and see if you get a hex value of 96 as well.&amp;nbsp; I suspect that maybe you don't have a true dash.&amp;nbsp; Either the encoding of your SAS session or the font being used does not know how to display the value you do have, so you get a question mark.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to modify the data to contain a character that can be displayed properly.&amp;nbsp;&amp;nbsp;If trying to determine what exact character you have seems daunting, you could swap out the character you do have with the UNICODE function, specifying the Unicode value for dash.&amp;nbsp; Simply copy the dash you see in the data and paste it as the second argument in the TRANWRD function.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
a='R – Activate jack';
b = tranwrd(a,'–','^{unicode 2013}');
run;

ods escapechar="^";
ods excel file='test.xlsx';
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Technical Support is a resource.&amp;nbsp; You can submit a track &lt;A href="https://support.sas.com/ctx/supportform/createForm" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;and one of the consultants can help you debug further.&amp;nbsp; Be sure to provide at least one record of data that contains the character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jane&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 20:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-writing-as-in-proc-report/m-p/521651#M4257</guid>
      <dc:creator>JaneEslinger</dc:creator>
      <dc:date>2018-12-14T20:47:37Z</dc:date>
    </item>
  </channel>
</rss>

