<?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 Encoding changes when using Task Scheduler in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Encoding-changes-when-using-Task-Scheduler/m-p/680408#M205621</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of SAS programs set up in Task Scheduler to be run automatically each day. One of them is never run through because there are encoding issues. If I run the program manually however it succeeds. In Task Scheduler the encoding is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&lt;CODE class=" language-sas"&gt;proc options option=encoding;&lt;/CODE&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;ENCODING=UTF-8 Specifies the default character-set encoding for the SAS session.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run exactly the same program manually the encoding is instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&lt;CODE class=" language-sas"&gt;proc options option=encoding;&lt;/CODE&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;ENCODING=WLATIN1 Specifies the default character-set encoding for the SAS session.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because of this I try to change the encoding for specific datasets in the program like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets library=work nodetails nolist;
modify DATASET/ correctencoding='wlatin1';
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DATASET_1 (encoding="wlatin1");
set DATASET;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still get this in Task Scheduler:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOTE: Data file DATASET is in a format that is native to another host, or the &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;file encoding does not match the session encoding. Cross Environment Data Access will be &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;used, which might require additional CPU resources and might reduce performance.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ERROR: Some character data was lost during transcoding in the dataset DATASET. &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Either the data contains characters that are not representable in the new encoding or &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;truncation occurred during transcoding.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the folder SASFoundation -&amp;gt; 9.4 there is both an "en" folder and an "u8" folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don´t want to mess with the configuration files. Is there a way to solve this in my original SAS program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Aug 2020 13:39:25 GMT</pubDate>
    <dc:creator>Petter_Ferro</dc:creator>
    <dc:date>2020-08-31T13:39:25Z</dc:date>
    <item>
      <title>Encoding changes when using Task Scheduler</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Encoding-changes-when-using-Task-Scheduler/m-p/680408#M205621</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of SAS programs set up in Task Scheduler to be run automatically each day. One of them is never run through because there are encoding issues. If I run the program manually however it succeeds. In Task Scheduler the encoding is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&lt;CODE class=" language-sas"&gt;proc options option=encoding;&lt;/CODE&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;ENCODING=UTF-8 Specifies the default character-set encoding for the SAS session.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run exactly the same program manually the encoding is instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&lt;CODE class=" language-sas"&gt;proc options option=encoding;&lt;/CODE&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;ENCODING=WLATIN1 Specifies the default character-set encoding for the SAS session.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because of this I try to change the encoding for specific datasets in the program like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets library=work nodetails nolist;
modify DATASET/ correctencoding='wlatin1';
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DATASET_1 (encoding="wlatin1");
set DATASET;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still get this in Task Scheduler:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOTE: Data file DATASET is in a format that is native to another host, or the &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;file encoding does not match the session encoding. Cross Environment Data Access will be &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;used, which might require additional CPU resources and might reduce performance.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ERROR: Some character data was lost during transcoding in the dataset DATASET. &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Either the data contains characters that are not representable in the new encoding or &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;truncation occurred during transcoding.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the folder SASFoundation -&amp;gt; 9.4 there is both an "en" folder and an "u8" folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don´t want to mess with the configuration files. Is there a way to solve this in my original SAS program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 13:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Encoding-changes-when-using-Task-Scheduler/m-p/680408#M205621</guid>
      <dc:creator>Petter_Ferro</dc:creator>
      <dc:date>2020-08-31T13:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Encoding changes when using Task Scheduler</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Encoding-changes-when-using-Task-Scheduler/m-p/680572#M205700</link>
      <description>&lt;P&gt;It seems that SAS loads one configuration file when called from the scheduler and another when run manually. Just ensure that both configuration files set the same encoding value for their respective SAS session.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 22:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Encoding-changes-when-using-Task-Scheduler/m-p/680572#M205700</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-31T22:14:05Z</dc:date>
    </item>
  </channel>
</rss>

