<?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: Importing data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459237#M116622</link>
    <description>&lt;P&gt;Here it is!&amp;nbsp; It's so strange how it's not importing the last column...would love your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;Group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Age&amp;nbsp; &amp;nbsp; Count1&amp;nbsp; Count2&amp;nbsp; &amp;nbsp;Count3&amp;nbsp; &amp;nbsp;Count4&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2018 10:51:44 GMT</pubDate>
    <dc:creator>lmyers2</dc:creator>
    <dc:date>2018-05-02T10:51:44Z</dc:date>
    <item>
      <title>Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459169#M116596</link>
      <description>&lt;P&gt;Hello - this should be simple but for some reason my data isn't importing correctly!&amp;nbsp; For some reason my last variable Count4 comes in missing as periods. When I look at the original data file, it looks fine (not a symbol or something at the Count4 position). Can someone help? Code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new; infile 'LOCATION';
input ID Group age Count1 Count2 Count3 Count4;
datalines;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 02:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459169#M116596</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2018-05-02T02:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459170#M116597</link>
      <description>&lt;P&gt;You're going to have to provide more information, in this case, most likely a sample of the data so we can test the code. If you can't provide actual data, you'll need to mock up some fake data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should ideally include the log, especially if there are any warnings, errors or notes beyond the normal record/time count.&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/165633"&gt;@lmyers2&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello - this should be simple but for some reason my data isn't importing correctly!&amp;nbsp; For some reason my last variable Count4 comes in missing as periods. When I look at the original data file, it looks fine (not a symbol or something at the Count4 position). Can someone help? Code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Laura&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new; infile 'LOCATION';
input ID Group age Count1 Count2 Count3 Count4;
datalines;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 02:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459170#M116597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-02T02:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459237#M116622</link>
      <description>&lt;P&gt;Here it is!&amp;nbsp; It's so strange how it's not importing the last column...would love your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;Group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Age&amp;nbsp; &amp;nbsp; Count1&amp;nbsp; Count2&amp;nbsp; &amp;nbsp;Count3&amp;nbsp; &amp;nbsp;Count4&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 10:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459237#M116622</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2018-05-02T10:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459239#M116624</link>
      <description>&lt;P&gt;open your datafile in notepad++ and use &lt;EM&gt;&lt;STRONG&gt;show all characters&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp; option to see what are the additional characters causing this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cleaned your sample data and it worked fine&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new; 
/*infile 'LOCATION';*/
input ID Group age Count1 Count2 Count3 Count4;
datalines;
1 0 18 11 5 3 3 
2 0 35 11 3 5 3 
3 1 26 6 2 4 0 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 May 2018 10:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459239#M116624</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-05-02T10:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459242#M116625</link>
      <description>&lt;P&gt;Here is the error message from SAS&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for Count4 in line 1 59-60.&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---&lt;/P&gt;&lt;P&gt;1 CHAR 1 0 31 11 5 3 3 3. 60&lt;BR /&gt;ZONE 222222222223222223222222332222223322222232222232222232222230&lt;BR /&gt;NUMR 00000000000100000000000031000000110000005000003000003000003D&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 11:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459242#M116625</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2018-05-02T11:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459253#M116629</link>
      <description>&lt;P align="left"&gt;Occasionally programmers get invalid-data messages because they are trying to read unprintable or other non-standard characters such as carriage returns. At those times SAS prints two more lines of data labeled ZONE and NUMR. These lines are the hexadecimal representation of the raw data. You don’t have to be able to read hexadecimal to be able to interpret this. SAS prints the data this way&lt;/P&gt;&lt;P align="left"&gt;because the normal 10 numerals and 26 letters don’t provide enough values to represent all computer symbols uniquely. Hexadecimal uses two characters to represent each symbol. To read hexadecimal, take a digit from the ZONE line together with the corresponding digit from the NUMR line.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 11:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459253#M116629</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-05-02T11:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459330#M116650</link>
      <description>&lt;P&gt;Thanks - is there a notepad++ version for mac?&amp;nbsp; Is it that there is or isn't a hard return or tab after each row of the data in dataline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 14:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459330#M116650</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2018-05-02T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459332#M116651</link>
      <description>&lt;P&gt;For a Mac, I use TextWrangler, the free version.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 14:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459332#M116651</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-02T14:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459362#M116658</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Here is the error message from SAS&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid data for Count4 in line 1 59-60.&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---&lt;/P&gt;
&lt;P&gt;1 CHAR 1 0 31 11 5 3 3 3. 60&lt;BR /&gt;ZONE 222222222223222223222222332222223322222232222232222232222230&lt;BR /&gt;NUMR 00000000000100000000000031000000110000005000003000003000003D&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Pasting anything from the log into a code box opened with the forum's {I} menu icon improves readability to considerable margin as the code box is plain text and doesn't get reformatted or use proportional fonts that make lining up columns as above&lt;/P&gt;
&lt;P&gt;For instance all those columns with 2 over 0 represent spaces. But the line that appears above ZONE has been reformatted by the message window to remove multiple spaces&lt;/P&gt;
&lt;P&gt;This invalid data note should look more like:&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for Count4 in line 1 59-60.
RULE:  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---

1 CHAR            1     0      31      11      5     3     3     3. 60
ZONE   222222222223222223222222332222223322222232222232222232222230
NUMR   00000000000100000000000031000000110000005000003000003000003D
&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 May 2018 15:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459362#M116658</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-02T15:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459370#M116659</link>
      <description>post at least one line of data so we can check what is wrong though problem seems here 3.</description>
      <pubDate>Wed, 02 May 2018 15:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459370#M116659</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-05-02T15:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459398#M116677</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello - this should be simple but for some reason my data isn't importing correctly!&amp;nbsp; For some reason my last variable Count4 comes in missing as periods. When I look at the original data file, it looks fine (not a symbol or something at the Count4 position). Can someone help? Code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Laura&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new; infile 'LOCATION';
input ID Group age Count1 Count2 Count3 Count4;
datalines;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maybe time to describe your environment. Are you running SAS stand alone on your machine or connecting to a server? Are you running SAS for Mac or for Windows in an emulator window? If connecting to a server what OS is the server?&lt;/P&gt;
&lt;P&gt;A common issue is to have source files from one operating system which use different end of line indicators and reading them in a different environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try adding this option to your INFILE statement: TERMSTR=CR and see if that helps. If so then it is one of these file format issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 16:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-data/m-p/459398#M116677</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-02T16:20:41Z</dc:date>
    </item>
  </channel>
</rss>

