<?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: Import text with Non-Printable ASCII characters in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-text-with-Non-Printable-ASCII-characters/m-p/467065#M30298</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213256"&gt;@hyracer86&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The record layout in your screenshot and the how you set the pointers in your data step don't align.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where did you get the start positions, types and lengths for your field from. Is that based on some record description/data dictionary?&lt;/P&gt;
&lt;P&gt;Do you have additional information for this source file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally: Instead of a picture attach a text file here with a few actual records in it.&lt;/P&gt;
&lt;P&gt;If you have to download the file first from a server then make sure that there is no character conversion happening (i.e. use ftp in binary mode).&lt;/P&gt;</description>
    <pubDate>Sat, 02 Jun 2018 03:05:16 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-06-02T03:05:16Z</dc:date>
    <item>
      <title>Import text with Non-Printable ASCII characters</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-text-with-Non-Printable-ASCII-characters/m-p/467024#M30297</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm using the following code to import a text file from a server to SAS, but the file contains some "Non-Printable ASCII" characters like "NUL", "SOH", "SUB" etc like the image bellow, I think thats the reason why I'm losing some records and getting others truncated during the import process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any specific way to import this kind of files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample File (click to open the image):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Posicional.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20965i7E0A3BADCF048AF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Posicional.png" alt="Posicional.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;

infile "/server/sas/lib/file.txt" lrecl = 4096 truncover;

input

@1 COLLUMN_A 9.
@10 COLLUMN_B $CHAR10.
@20 COLLUMN_C $CHAR20.
@40 COLLUMN_D $CHAR3.
@43 COLLUMN_E $CHAR1.
@44 COLLUMN_F $CHAR1.
@45 COLLUMN_G $CHAR1.
@46 COLLUMN_H $CHAR18.
@64 COLLUMN_I $CHAR6.
@70 COLLUMN_ETC $CHAR5.;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 20:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-text-with-Non-Printable-ASCII-characters/m-p/467024#M30297</guid>
      <dc:creator>hyracer86</dc:creator>
      <dc:date>2018-06-01T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import text with Non-Printable ASCII characters</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-text-with-Non-Printable-ASCII-characters/m-p/467065#M30298</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213256"&gt;@hyracer86&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The record layout in your screenshot and the how you set the pointers in your data step don't align.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where did you get the start positions, types and lengths for your field from. Is that based on some record description/data dictionary?&lt;/P&gt;
&lt;P&gt;Do you have additional information for this source file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally: Instead of a picture attach a text file here with a few actual records in it.&lt;/P&gt;
&lt;P&gt;If you have to download the file first from a server then make sure that there is no character conversion happening (i.e. use ftp in binary mode).&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 03:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-text-with-Non-Printable-ASCII-characters/m-p/467065#M30298</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-02T03:05:16Z</dc:date>
    </item>
  </channel>
</rss>

