<?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 Importing Special Characters in SAS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797617#M39205</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a study trial summary which have alpha and Gamma characters in the data. i am trying to import the xlsx file but it is excluding the special character. can some one please elp me with a code to import these special characters in into SAS format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code i am using&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;filename name "C:\STATISTICS\ Trial Design_Specs.xlsx";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc import datafile = name&lt;BR /&gt;out = ts1&lt;BR /&gt;dbms = xlsx&lt;BR /&gt;replace ;&lt;BR /&gt;sheet = 'TS' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tss;&lt;BR /&gt;length STUDYID $200.&lt;BR /&gt;DOMAIN $200.&lt;BR /&gt;TSSEQ 8.&lt;BR /&gt;TSPARMCD $200.&lt;BR /&gt;TSPARM $200.&lt;BR /&gt;TSVAL $200.&amp;nbsp;&lt;BR /&gt;TSVALNF $200.&lt;BR /&gt;TSVALCD $200.&lt;BR /&gt;TSVALCD $200.&lt;BR /&gt;TSVCDREF $200.;&lt;BR /&gt;TSVCDVER $200. ;&lt;BR /&gt;set ts1;&lt;BR /&gt;format _ALL_;&lt;BR /&gt;informat _ALL_ ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ts2 ;&lt;BR /&gt;set tss(where=(studyid ne '');&lt;BR /&gt;TSVAL=strip(tranwrd(TSVAL, '0D0A'x, ' '));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following warning in the log .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I.&lt;BR /&gt;WARNING: Some character data was lost during transcoding in column: TSVAL at obs 26.&lt;BR /&gt;NOTE: The import data set has 67 observations and 14 variables.&lt;BR /&gt;NOTE: WORK.TS1 data set was successfully created.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neha&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 16:44:27 GMT</pubDate>
    <dc:creator>NehaChopra</dc:creator>
    <dc:date>2022-02-21T16:44:27Z</dc:date>
    <item>
      <title>Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797617#M39205</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a study trial summary which have alpha and Gamma characters in the data. i am trying to import the xlsx file but it is excluding the special character. can some one please elp me with a code to import these special characters in into SAS format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code i am using&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;filename name "C:\STATISTICS\ Trial Design_Specs.xlsx";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc import datafile = name&lt;BR /&gt;out = ts1&lt;BR /&gt;dbms = xlsx&lt;BR /&gt;replace ;&lt;BR /&gt;sheet = 'TS' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tss;&lt;BR /&gt;length STUDYID $200.&lt;BR /&gt;DOMAIN $200.&lt;BR /&gt;TSSEQ 8.&lt;BR /&gt;TSPARMCD $200.&lt;BR /&gt;TSPARM $200.&lt;BR /&gt;TSVAL $200.&amp;nbsp;&lt;BR /&gt;TSVALNF $200.&lt;BR /&gt;TSVALCD $200.&lt;BR /&gt;TSVALCD $200.&lt;BR /&gt;TSVCDREF $200.;&lt;BR /&gt;TSVCDVER $200. ;&lt;BR /&gt;set ts1;&lt;BR /&gt;format _ALL_;&lt;BR /&gt;informat _ALL_ ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ts2 ;&lt;BR /&gt;set tss(where=(studyid ne '');&lt;BR /&gt;TSVAL=strip(tranwrd(TSVAL, '0D0A'x, ' '));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following warning in the log .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I.&lt;BR /&gt;WARNING: Some character data was lost during transcoding in column: TSVAL at obs 26.&lt;BR /&gt;NOTE: The import data set has 67 observations and 14 variables.&lt;BR /&gt;NOTE: WORK.TS1 data set was successfully created.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neha&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 16:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797617#M39205</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-21T16:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797662#M39207</link>
      <description>&lt;P&gt;I would use Find/Replace in xcel to change those characters to "_gamma" and "_alpha."&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 22:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797662#M39207</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-02-21T22:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797664#M39208</link>
      <description>Here is another way:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352237#M82077" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352237#M82077&lt;/A&gt;</description>
      <pubDate>Mon, 21 Feb 2022 22:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797664#M39208</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-02-21T22:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797762#M39210</link>
      <description>&lt;P&gt;that cannot be changed as that is a trial summary specs. and is sponsor approved&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 10:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797762#M39210</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-22T10:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797763#M39211</link>
      <description>&lt;P&gt;i tried the above way as well but it is not working&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 10:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797763#M39211</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-22T10:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797803#M39222</link>
      <description>&lt;P&gt;I always get curious when someone replies that something is "not working".&amp;nbsp; How is it not working?&amp;nbsp; Be specific and provide any errors, warnings or specific NOTEs from the LOG and make sure that those have some context, especially if you are executing a macro.&amp;nbsp; Also, there may be messages in the output, depending on the PROCs involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 13:09:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797803#M39222</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-02-22T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797819#M39226</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Even after using the code i am getting this warning and looking at the output the characters are not converted and are missing ..&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;&lt;SPAN&gt;WARNING: Some character data was lost during transcoding in column: TSVAL at obs 26&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;neha&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797819#M39226</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-22T14:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797840#M39228</link>
      <description>&lt;P&gt;If you want to read an XLSX file with non-ASCII characters in it then you probably need to be running SAS with encoding option set to UTF-8.&amp;nbsp; &amp;nbsp;If you are using a single byte encoding like WLATIN1 then there are only 256 characters that can be represented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The encoding option can only be set when SAS starts.&amp;nbsp; Look for an option that use UTF-8.&amp;nbsp; Perhaps it is called unicode support.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you running SAS?&amp;nbsp; Are you running a sas command from the command line? Are you using SAS Display Manager interactive to run SAS?&amp;nbsp; Or are you using some front-end interface to generate and run your SAS code.&amp;nbsp; Like SAS/Studio or Enterprise Guide?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 15:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797840#M39228</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-22T15:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797844#M39229</link>
      <description>&lt;P&gt;Here is a workaround e.g., for α :&lt;BR /&gt;1. Find/Replace to "alpha" in excel&lt;BR /&gt;2. import&lt;BR /&gt;3. Replace "alpha" with α in SAS (&lt;A href="https://www.lexjansen.com/pharmasug/2010/CC/CC19.pdf" target="_blank" rel="noopener"&gt;https://www.lexjansen.com/pharmasug/2010/CC/CC19.pdf) :&lt;/A&gt;&lt;BR /&gt;%macro specchar(n=, symbol=);&lt;BR /&gt;%global &amp;amp;symbol;&lt;BR /&gt;data _null_;&lt;BR /&gt;char=input(&amp;amp;n., $UCS2B4.); &lt;BR /&gt;call symput("&amp;amp;symbol.",trim(left(char)));&lt;BR /&gt;run;&lt;BR /&gt;%put symbol=&amp;amp;&amp;amp;&amp;amp;symbol..;&lt;BR /&gt;&lt;BR /&gt;data test;&lt;BR /&gt;var1 = "alpha";&lt;BR /&gt;var2 = tranwrd(var1, "alpha", "&amp;amp;&amp;amp;&amp;amp;symbol..");&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%mend;&lt;BR /&gt;%specchar(n='0040'x, symbol=alpha); *this is not exactly alpha, but 'at', the format does not show a symbol unless its code starts with '00' on a character map, you would need to explore that further to make this work;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 16:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/797844#M39229</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-02-22T16:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Special Characters in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/798626#M39269</link>
      <description>&lt;LI-SPOILER&gt;Changing the excel sheet is not a solution in my case as we cannot touch the excel sheet. this might lead in Pinnacle Issue.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Neha&amp;nbsp;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Fri, 25 Feb 2022 16:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Importing-Special-Characters-in-SAS/m-p/798626#M39269</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-25T16:09:24Z</dc:date>
    </item>
  </channel>
</rss>

