<?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: enconding='any' is not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/915512#M360747</link>
    <description>&lt;P&gt;The log is quite verbose about why it is not working:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    proc import
2    datafile='/data/bvd/unrar/Contact_info.txt'
3    encoding='any';
     --------
     22
     76
ERROR 22-322: Syntax error, expecting one of the following: ;, DATAFILE, DATATABLE, DBMS, DEBUG, FILE,
              OUT, REPLACE, TABLE, _DEBUG_.

ERROR 76-322: Syntax error, statement will be ignored.

4    out=contacts
5    dbms=dlm
6    replace;
7    delimiter = '09'x;
8    guessingrows=max;
9    run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS is not expecting "encoding" keyword there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the "encoding" in FILENAME statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename F '/data/bvd/unrar/Contact_info.txt' encodeing='utf-8';

proc import 
datafile=F; 
out=contacts 
dbms=dlm 
replace; 
delimiter = '09'x; 
guessingrows=max;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And for a text file I suggest you check out this list:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n1r7pnb91iybs9n1hgvsj7q09srd.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n1r7pnb91iybs9n1hgvsj7q09srd.htm&lt;/A&gt;&amp;nbsp;rather "any".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 08:26:54 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2024-02-12T08:26:54Z</dc:date>
    <item>
      <title>enconding='any' is not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/915511#M360746</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='/data/bvd/unrar/Contact_info.txt'	encoding='any'; out=contacts dbms=dlm replace; delimiter = '09'x; guessingrows=max;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm using this cline of code to import data, but it bombs because of the statement encoding='any'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any clues why is it bombing?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 08:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/915511#M360746</guid>
      <dc:creator>Satori</dc:creator>
      <dc:date>2024-02-12T08:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: enconding='any' is not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/915512#M360747</link>
      <description>&lt;P&gt;The log is quite verbose about why it is not working:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    proc import
2    datafile='/data/bvd/unrar/Contact_info.txt'
3    encoding='any';
     --------
     22
     76
ERROR 22-322: Syntax error, expecting one of the following: ;, DATAFILE, DATATABLE, DBMS, DEBUG, FILE,
              OUT, REPLACE, TABLE, _DEBUG_.

ERROR 76-322: Syntax error, statement will be ignored.

4    out=contacts
5    dbms=dlm
6    replace;
7    delimiter = '09'x;
8    guessingrows=max;
9    run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS is not expecting "encoding" keyword there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the "encoding" in FILENAME statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename F '/data/bvd/unrar/Contact_info.txt' encodeing='utf-8';

proc import 
datafile=F; 
out=contacts 
dbms=dlm 
replace; 
delimiter = '09'x; 
guessingrows=max;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And for a text file I suggest you check out this list:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n1r7pnb91iybs9n1hgvsj7q09srd.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n1r7pnb91iybs9n1hgvsj7q09srd.htm&lt;/A&gt;&amp;nbsp;rather "any".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 08:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/915512#M360747</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-02-12T08:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: enconding='any' is not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/916747#M361096</link>
      <description>1036       filename C '/data/bvd/unrar/Contact_info.txt' encoding='any';&lt;BR /&gt;1037       proc import datafile=C;&lt;BR /&gt;ERROR: Output SAS data set must be provided.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2024 07:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/916747#M361096</guid>
      <dc:creator>Satori</dc:creator>
      <dc:date>2024-02-19T07:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: enconding='any' is not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/916752#M361097</link>
      <description>&lt;P&gt;Now you're just being lazy. &lt;span class="lia-unicode-emoji" title=":smiling_face_with_horns:"&gt;😈&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You have to provide the OUT= data set name for proc import to create a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173636"&gt;@Satori&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;1036 filename C '/data/bvd/unrar/Contact_info.txt' encoding='any';&lt;BR /&gt;1037 proc import datafile=C;&lt;BR /&gt;ERROR: Output SAS data set must be provided.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 08:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/enconding-any-is-not-working/m-p/916752#M361097</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-02-19T08:58:28Z</dc:date>
    </item>
  </channel>
</rss>

