<?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: changing the encoding of my SAS session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727417#M226237</link>
    <description>&lt;P&gt;Thank you, everyone!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 14:25:32 GMT</pubDate>
    <dc:creator>Emma_at_SAS</dc:creator>
    <dc:date>2021-03-18T14:25:32Z</dc:date>
    <item>
      <title>changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726972#M226000</link>
      <description>&lt;P&gt;I guess my SAS session has encoding WLATIN1, while my SAS data file has UTF-8 encoding. I need to change my SAS session's encoding to UTF-8. I tried the following code but did not work. I appreciate it if you may guide me. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data SAS_data; 
	set name_lib.data;  
	ENCODING='UTF-8'; 
	OPTIONS NOFMTERR; 
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;LI-SPOILER&gt;
&lt;DIV id="sasLogNote1_1615953498578" class="sasNote"&gt;NOTE: Data file &lt;CODE class=" language-sas"&gt;name_lib.data&lt;/CODE&gt;.DATA is in a format that is native to another host, or the file encoding does not match the&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;session encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;performance.&lt;/DIV&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;DIV id="sasLogError1_1615953498578" class="sasError"&gt;ERROR: Some character data was lost during transcoding in the dataset &lt;CODE class=" language-sas"&gt;name_lib.data&lt;/CODE&gt;. Either the data contains characters&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;that are not representable in the new encoding or truncation occurred during transcoding.&lt;/DIV&gt;
&lt;/LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options option=config; run;
proc options group=languagecontrol; run;
proc options option=encoding; run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc options option=config; run;
 
     SAS (r) Proprietary Software Release 9.4  TS1M7
 
  CONFIG=( "C:\SAS\Config\Lev1\SASApp\WorkspaceServer\sasv9.cfg" "C:\SAS\Config\Lev1\SASApp\sasv9.cfg" "C:\Program 
 Files\SASHome\SASFoundation\9.4\sasv9.cfg" "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg" 
 "C:\SAS\Config\Lev1\SASApp\sasv9_usermods.cfg" "C:\SAS\Config\Lev1\SASApp\WorkspaceServer\sasv9_usermods.cfg" )
                    Specifies the configuration file that is used when initializing or overriding the values of SAS system options.
 NOTE: PROCEDURE OPTIONS used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 74         proc options group=languagecontrol; run;
 
     SAS (r) Proprietary Software Release 9.4  TS1M7
 
 
 Group=LANGUAGECONTROL
  DATESTYLE=MDY     Specifies the sequence of month, day, and year when ANYDTDTE, ANYDTDTM, or ANYDTTME informat data is ambiguous.
  DFLANG=LOCALE     Specifies the language for international date informats and formats.
  DSCAS             Runs the DATA step on the CAS server.
  EXTENDOBSCOUNTER=YES
                    Specifies whether to extend the maximum number of observations in a new SAS data file.
  LOCALEDATA=SASLOCALE
                    Specifies the location of the locale database.
  NOLOGLANGCHG      Disables changing the language of the SAS log when the LOCALE= option is changed.
  NOLOGLANGENG      Write SAS log messages based on the values of the LOGLANGCHG, LSWLANG=, and LOCALE= options when SAS started.
  LSWLANG=LOCALE    Specifies the language for SAS log and ODS messages when the LOCALE= option is set after SAS starts.
  MAPEBCDICTOASCII= Specifies the transcoding table that is used to convert characters from ASCII to EBCDIC and EBCDIC to ASCII.
  NONLDECSEPARATOR  Disables formatting of numeric output using the decimal separator for the locale.
  NOODSLANGCHG      Disables changing the language of the SAS message text in ODS output when the LOCALE option is set after start 
                    up.
  PAPERSIZE=LETTER  Specifies the paper size to use for printing.
  RSASIOTRANSERROR  Displays a transcoding error when illegal values are read from a remote application.
  TIMEZONE='GMT-04:00'
                    Specifies a time zone.
  TRANTAB=(lat1lat1,lat1lat1,wlt1_ucs,wlt1_lcs,wlt1_ccl,,,)
                    Specifies the translation table catalog entries.
  URLENCODING=SESSION
                    Specifies whether the argument to the URLENCODE function and to the URLDECODE function is interpreted using the 
                    SAS session encoding or UTF-8 encoding.
  NODBCS            Disables double-byte character sets.
  DBCSLANG=NONE     Specifies a double-byte character set language.
  DBCSTYPE=NONE     Specifies the encoding method to use for a double-byte character set.
  ENCODING=WLATIN1  Specifies the default character-set encoding for the SAS session.
  LOCALE=EN_US      Specifies a set of attributes in a SAS session that reflect the language, local conventions, and culture for a 
                    geographical region.
  NONLSCOMPATMODE   Encodes data using the SAS session encoding.
 NOTE: PROCEDURE OPTIONS used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 75         proc options option=encoding; run;
 
     SAS (r) Proprietary Software Release 9.4  TS1M7
 
  ENCODING=WLATIN1  Specifies the default character-set encoding for the SAS session.
 NOTE: PROCEDURE OPTIONS used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 76         
 77         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 89         
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 04:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726972#M226000</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-03-17T04:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726974#M226002</link>
      <description>&lt;P&gt;Do you need to process UTF-8 encoding data sets within the current session?&lt;BR /&gt;The easiest way is to use the SAS Unicode version.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 04:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726974#M226002</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-03-17T04:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726983#M226009</link>
      <description>&lt;P&gt;You just need to add the following line to your file:&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;C:\SAS\Config\Lev1\SASApp\sasv9_usermods.cfg&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;-ENCODING = UTF-8&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 05:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/726983#M226009</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-17T05:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727054#M226052</link>
      <description>&lt;P&gt;If your sas was stand alone PC version . Try Unicode version sas.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 379px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56042i096869E14538406B/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>Wed, 17 Mar 2021 10:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727054#M226052</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-17T10:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727101#M226074</link>
      <description>&lt;P&gt;Thanks everyone! Using the SAS(Unicode) session was the easiest way I could use to read my whole data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this SAS environment (Unicode), I see an extra column as ENCODING (Char). Is everything in this environment work similar to the regular SAS(DBCS) session and saved normally to be used in the other environment later? Is there anything I should be careful about?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 13:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727101#M226074</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-03-17T13:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727103#M226075</link>
      <description>Thanks, SASKiwi. How do I exactly add ENCODING = UTF-8 to my file?</description>
      <pubDate>Wed, 17 Mar 2021 13:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727103#M226075</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-03-17T13:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727105#M226076</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84351"&gt;@Emma_at_SAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks, SASKiwi. How do I exactly add ENCODING = UTF-8 to my file?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Edit it with Notepad. SAS cfg files are simple text files.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 13:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727105#M226076</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-17T13:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727358#M226206</link>
      <description>"Is everything in this environment work similar to the regular SAS(DBCS) session "&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;"and saved normally to be used in the other environment later?"&lt;BR /&gt;No. only for utf-8 encoding environment .</description>
      <pubDate>Thu, 18 Mar 2021 11:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727358#M226206</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-18T11:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727415#M226235</link>
      <description>"and saved normally to be used in the other environment later?"&lt;BR /&gt;No. only for utf-8 encoding environment.&lt;BR /&gt;--&amp;gt; So, the code from the SAS(UNICODE) works well for two environments: SAS(UNICODE) and the UTF-8 encoding environment.</description>
      <pubDate>Thu, 18 Mar 2021 14:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727415#M226235</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-03-18T14:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727417#M226237</link>
      <description>&lt;P&gt;Thank you, everyone!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 14:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727417#M226237</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-03-18T14:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: changing the encoding of my SAS session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727719#M226400</link>
      <description>SAS CODE could work at any encoding , But Data does not .&lt;BR /&gt;SAS(UNICODE)  IS JUST (equal) UTF-8 encoding environment.</description>
      <pubDate>Fri, 19 Mar 2021 10:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-the-encoding-of-my-SAS-session/m-p/727719#M226400</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-19T10:17:28Z</dc:date>
    </item>
  </channel>
</rss>

