<?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: Text string starting with a number is adding question marks in proc print in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495526#M72354</link>
    <description>&lt;P&gt;Is that variable in the ACCESS database a character variable or a date variable?&lt;/P&gt;
&lt;P&gt;The symptom you describe sometimes indicates that a character variable contains characters that either the font you are using for the output (controlled by you active style) does not recognize the value or that there may be an encoding difference between the data base and your SAS session.&lt;/P&gt;
&lt;P&gt;Does this have the same appearance if you use an ODS RTF destination instead? CSV files do not contain any font information. So depending on the font your application for viewing the CSV file with may not have definitions for certain characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options could include creating a SAS data set and instead of sending results directly from the data base to csv (Access should do that directly) and 1) editing a character field 2) creating a SAS date value and using a SAS date format to display the value 3) changing font in the program viewing the csv 4) changing encoding of the dataset.&lt;/P&gt;
&lt;P&gt;You might also change to using PROC Export to CSV instead ODS CSV by selecting the variables in a dataset option.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Sep 2018 21:12:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-13T21:12:44Z</dc:date>
    <item>
      <title>Text string starting with a number is adding question marks in proc print</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495509#M72352</link>
      <description>&lt;P&gt;I'm reading in an MS Access file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname enrsum access path='\\warehouse\freezes_official_2010.accdb';&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing some processing on other fields, then writing the data to a file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;BR /&gt;ods csv file="t:\201910Tday15.csv" style=minimal;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a proc print statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=work.RECODE;&lt;BR /&gt;var PERSON_UID&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ACADEMIC_PERIOD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FREEZE_EVENT;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format of the freeze_event from the Access file is 201910TDAY15.&amp;nbsp; When the proc print puts it in a file, it adds question marks and looks like 201910?T?DAY15.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it doing this and how do I fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 20:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495509#M72352</guid>
      <dc:creator>ssavor</dc:creator>
      <dc:date>2018-09-13T20:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Text string starting with a number is adding question marks in proc print</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495526#M72354</link>
      <description>&lt;P&gt;Is that variable in the ACCESS database a character variable or a date variable?&lt;/P&gt;
&lt;P&gt;The symptom you describe sometimes indicates that a character variable contains characters that either the font you are using for the output (controlled by you active style) does not recognize the value or that there may be an encoding difference between the data base and your SAS session.&lt;/P&gt;
&lt;P&gt;Does this have the same appearance if you use an ODS RTF destination instead? CSV files do not contain any font information. So depending on the font your application for viewing the CSV file with may not have definitions for certain characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options could include creating a SAS data set and instead of sending results directly from the data base to csv (Access should do that directly) and 1) editing a character field 2) creating a SAS date value and using a SAS date format to display the value 3) changing font in the program viewing the csv 4) changing encoding of the dataset.&lt;/P&gt;
&lt;P&gt;You might also change to using PROC Export to CSV instead ODS CSV by selecting the variables in a dataset option.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 21:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495526#M72354</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-13T21:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Text string starting with a number is adding question marks in proc print</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495611#M72367</link>
      <description>&lt;P&gt;Have you tried using proc export instead of proc print?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/495611#M72367</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-09-14T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Text string starting with a number is adding question marks in proc print</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/496340#M72417</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I will try PROC EXPORT.&amp;nbsp; It turns out that the field inadvertently had special characters in it and that was causing the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:47:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/496340#M72417</guid>
      <dc:creator>ssavor</dc:creator>
      <dc:date>2018-09-17T17:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Text string starting with a number is adding question marks in proc print</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/496342#M72418</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I will try EXPORT.&amp;nbsp; It turns out that the field inadvertently had special characters in it and that was causing the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Text-string-starting-with-a-number-is-adding-question-marks-in/m-p/496342#M72418</guid>
      <dc:creator>ssavor</dc:creator>
      <dc:date>2018-09-17T17:48:42Z</dc:date>
    </item>
  </channel>
</rss>

