<?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: How I can to remove or convert special character in a file with infile statment? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942291#M45187</link>
    <description>&lt;P&gt;I try to used another ecodings but isn't work too.&lt;BR /&gt;I need to remove "FF" , so I not found "Feed Form" documentation by SAS Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you knows to resolve "FF" INPUT Statement?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 13:43:46 GMT</pubDate>
    <dc:creator>Mozer19</dc:creator>
    <dc:date>2024-09-03T13:43:46Z</dc:date>
    <item>
      <title>How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942286#M45185</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mozer19_1-1725369261786.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99892i7B1C4E9A4548E354/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mozer19_1-1725369261786.png" alt="Mozer19_1-1725369261786.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Following image exemple, I have a special chars "FF" in 113º line.&lt;BR /&gt;So, I can't resolve this in infile statment.&lt;BR /&gt;I used code bellow, but isn't works.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;DATA linhao;
	    INFILE "&amp;amp;sysparm" ENCODING="UTF-8"  TRUNCOVER LRECL=341 OBS=1000;
		input
			@1  linhao $500.

			;
RUN;&lt;/PRE&gt;&lt;P&gt;I need a help!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942286#M45185</guid>
      <dc:creator>Mozer19</dc:creator>
      <dc:date>2024-09-03T13:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942287#M45186</link>
      <description>&lt;P&gt;I don't think 'FF'x is a valid UTF-8 character.&lt;/P&gt;
&lt;P&gt;You can use ENCODING='ANY' to tell SAS to not attempt to transcode the characters at all.&lt;/P&gt;
&lt;P&gt;Once you have the FF in the value of a SAS variable you can decide what to replace it with.&lt;/P&gt;
&lt;P&gt;Then if you did need to attempt to transcode the other bytes from UTF-8 to some other encoding you could use the KCVT() function.&amp;nbsp; But remember that there are many more possible characters in UTF-8 encoding than can fit into any the 256 possible values recognized by any single byte encoding such as WLATIN1 or LATIN1.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942287#M45186</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-03T13:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942291#M45187</link>
      <description>&lt;P&gt;I try to used another ecodings but isn't work too.&lt;BR /&gt;I need to remove "FF" , so I not found "Feed Form" documentation by SAS Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you knows to resolve "FF" INPUT Statement?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942291#M45187</guid>
      <dc:creator>Mozer19</dc:creator>
      <dc:date>2024-09-03T13:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942309#M45188</link>
      <description>&lt;P&gt;Does this still show the FF when reading the file?&lt;/P&gt;
&lt;PRE&gt;DATA linhao;
	    INFILE "&amp;amp;sysparm" ENCODING="UTF-8"  TRUNCOVER LRECL=341 OBS=1000  PRINT;
		input
			@1  linhao $500.

			;
RUN;&lt;/PRE&gt;
&lt;P&gt;Or look at the TERMSTR= options. You don't indicate which operating system you are running or what operating system created the file. The TERMSTR= can tell Windows that the file was written by Unix (or vice versa).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may also help to share the LOG from running the code to see if there are any interesting messages.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 14:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942309#M45188</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-03T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942320#M45189</link>
      <description>&lt;P&gt;Whilst this is more than you are asking, I usually remove non-printable characters from a string with the W modifier in the compress function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compress(string,'w')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2024 15:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942320#M45189</guid>
      <dc:creator>ClarkLawson</dc:creator>
      <dc:date>2024-09-03T15:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942321#M45190</link>
      <description>&lt;P&gt;Can you try....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA linhao;&lt;BR /&gt;INFILE "&amp;amp;sysparm" ENCODING="UTF-8" TRUNCOVER LRECL=341 OBS=1000;&lt;BR /&gt;INPUT @1 linhao $500.;&lt;/P&gt;&lt;P&gt;/* Replace special character (e.g., FF - form feed) with a space */&lt;BR /&gt;linhao = TRANSLATE(linhao, ' ', '0C'x); /* '0C'x is the hexadecimal value for form feed */&lt;/P&gt;&lt;P&gt;/* Alternatively, remove the special character */&lt;BR /&gt;linhao = COMPRESS(linhao, '0C'x);&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC PRINT DATA=linhao (OBS=5);&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 15:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942321#M45190</guid>
      <dc:creator>Sarath_A_SAS</dc:creator>
      <dc:date>2024-09-03T15:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: How I can to remove or convert special character in a file with infile statment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942370#M45191</link>
      <description>&lt;P&gt;The hex code for a Form Feed is '0C'x not FF.&amp;nbsp; Perhaps the photograph you showed was of some tool that displayed the Form Feed character as the little FF character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you are reading in an text report, like a SAS log file, that has form feed characters at the start of each new page then you should be able to remove them.&amp;nbsp; For example just using the COMPRESS() function.&amp;nbsp; But you might also want to count them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile 'myfile.txt' truncover;
  retain page 1;
  input line $char133.;
  if line=:'0C'x then page+1;
  line=compress(line,'0C'x);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2024 18:18:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-I-can-to-remove-or-convert-special-character-in-a-file-with/m-p/942370#M45191</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-03T18:18:40Z</dc:date>
    </item>
  </channel>
</rss>

