<?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: proc import notes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/579112#M164352</link>
    <description>My copy of SAS is running on my Win 7 machine. What is EG and DI?&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 05 Aug 2019 12:32:43 GMT</pubDate>
    <dc:creator>emaguin</dc:creator>
    <dc:date>2019-08-05T12:32:43Z</dc:date>
    <item>
      <title>proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578809#M164227</link>
      <description>&lt;P&gt;I'd like to understand some of the notes coming back from a proc import command.&lt;/P&gt;&lt;P&gt;I'm reading qualtrics data files, which are exported as csv files and use those characters as the extension.&lt;/P&gt;&lt;P&gt;I get this note:&amp;nbsp;EFI will truncate records &amp;gt; 32767; your record length was 131068&lt;/P&gt;&lt;P&gt;I opened the file up in notepad++ and the longest line is 14914 characters. My understanding, per wikipedia, is that&amp;nbsp;utf_8 is at most 4 bytes per character, so 57K bytes in round numbers. Can someone help understand the difference, or is Notepad++ misleading?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My import command is this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import&lt;BR /&gt;datafile='&amp;lt;input file string&amp;gt;'&amp;nbsp;out=output file string replace; datarow=3;&amp;nbsp;getnames=yes; guessingrows=max;&lt;/P&gt;&lt;P&gt;I read file line 1 as variable names, which they are; line 2 is the ~15K character item text line but i skip it; and line 3 is the first data line. Line 2 is useless to me. I could delete the line using Notepad++ or excel. However, can/does leaving to-be truncated but skipped line in the dataset have any adverse consequences?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't recall whether i've seen this or not but what is the maximum string length for a character variable and what happens if import encounters a string longer than that value?&lt;/P&gt;&lt;P&gt;Thanks, Gene Maguin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm posting this is Programming but i suppose its really Procedures. Does it matter? I kind of assume that those of you that reply do so to everything, regardless of community,&amp;nbsp;you're knowledgeable about and care to reply to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 19:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578809#M164227</guid>
      <dc:creator>emaguin</dc:creator>
      <dc:date>2019-08-02T19:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578812#M164229</link>
      <description>&lt;P&gt;Some programs may be a bit more generous about interpreting something as an end of line character than SAS Proc Import. So if your file has a mix of LF and CR/LF Notepad &lt;STRONG&gt;may&lt;/STRONG&gt; be accepting both of them as end of lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are happy with the content when using datarow=3 then skipping the second line is okay. If your line 2 is something related to additional description of the data I would keep it around&amp;nbsp;and likely do something with it, possible in assigning labels to variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have other issues, it might help if you show the data step code generated by proc Import. It may be easier to modify that data step to read your data than to get proc import directly as you can add options such as TERMSTR and LRECL to handle issues like the end of line or line length as well as possible encoding issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A character variable has a 32767 character limit. What proc import does may well depend on the actual file, version and such. I would expect that most likely the field may get truncated. If you have a single field that long you would have to write a data step to capture the truncated data and explicit raw data would likely be needed as it is unlikely to be a trivial exercise.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578812#M164229</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-02T20:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578813#M164230</link>
      <description>Is SAS running on a server here? Are you using Unix? EFI makes me think you're using EG or DI?&lt;BR /&gt;If a field has comments or open text that's usually problematic.&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578813#M164230</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-02T20:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578816#M164233</link>
      <description>&lt;P&gt;Please post the actual lines from the log if you want better advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A couple of ideas:&lt;/P&gt;
&lt;P&gt;1) Your header line might be too long for PROC IMPORT.&amp;nbsp; It does not (at least did not, I haven't tested in awhile) handle header lines that are longer than 32K.&amp;nbsp; This can cause it to generated generic names for the later columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Perhaps you are bit by the stupidity of Excel on the MAC.&amp;nbsp; For some reason on a MAC Excel will by default export to CSV using carriage return only as the end of line marker.&amp;nbsp; So unless you tell SAS to use TERMSTR=CR on your INFILE (or FILENAME) statement then the file looks like one long line to SAS since it is expecting either CR+LF (Windows standard) or LF (Unix standard).&amp;nbsp; The programmers at Excel apparently never learned that MACOS switch to UNIX many years ago, so it no longer uses CR as the end of line marker. You need to make sure when exporting from Excel on MAC to choose an output format that generates proper end of line markers.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/578816#M164233</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-02T20:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/579112#M164352</link>
      <description>My copy of SAS is running on my Win 7 machine. What is EG and DI?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Aug 2019 12:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/579112#M164352</guid>
      <dc:creator>emaguin</dc:creator>
      <dc:date>2019-08-05T12:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc import notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/579202#M164390</link>
      <description>&lt;P&gt;EG =&amp;gt; Enterprise Guide which is a point and click interface primarily&lt;/P&gt;
&lt;P&gt;DI =&amp;gt; Data Integration Studio&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's also SAS Studio.&amp;nbsp;&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/273054"&gt;@emaguin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;My copy of SAS is running on my Win 7 machine. What is EG and DI?&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 18:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-notes/m-p/579202#M164390</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-05T18:11:56Z</dc:date>
    </item>
  </channel>
</rss>

