<?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: Problem with reading DATALINES to import data in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796059#M417</link>
    <description>&lt;P&gt;Read the messages in the log, they should help you understand what is happening.&lt;/P&gt;
&lt;P&gt;Pasting the text into the body of you message instead of using the Insert Code or Insert SAS Code icons scrabbles it a little, but we can probably still figure out what it is saying.&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for BIRTHWT in line 72 1-21.
NOTE: Invalid data for WEANWT in line 73 1-21.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
 
76    &lt;BR /&gt;CHAR  0.839145885.3.9.1.M.2
ZONE  32333333333032303040322222222222222222222222222222222222222222222222222222222222
NUMR  0E83914588593E9919D9200000000000000000000000000000000000000000000000000000000000&lt;/PRE&gt;
&lt;P&gt;So it looks like you text file has tab characters ('09'x) between the values instead of the spaces that you told SAS to look for.&lt;/P&gt;
&lt;P&gt;Try adding an INFILE statement so you can tell SAS to look for the tabs.&amp;nbsp; &amp;nbsp;You should probably also add the DSD option in case there are any missing values that are represented in the file by two adjacent tabs.&amp;nbsp; You should also add the TRUNCOVER option so that you can prevent the other issue the log is showing:&lt;/P&gt;
&lt;PRE&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/PRE&gt;
&lt;P&gt;You could point the INFILE at the in-line data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pig;
  infile datalines dsd dlm='09'x truncover;
  input BIRTHWT WEANWT group $ sex $ litter $ ;
datalines;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But if your source data file has tabs between the values you probably should NOT paste the lines into the program editor as then they might be replaced with spaces.&amp;nbsp; Better to store the data in its own file and point the INFILE statement at that file.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 14:32:54 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-02-14T14:32:54Z</dc:date>
    <item>
      <title>Problem with reading DATALINES to import data</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/795671#M415</link>
      <description>&lt;P&gt;Here is my code: (please let me know what is wrong with it, the data cannot correctly be import).&lt;/P&gt;
&lt;P&gt;data pig;&lt;BR /&gt;input BIRTHWT WEANWT group$ sex$ litter$ ;&lt;BR /&gt;datalines;&lt;BR /&gt;0.771107029 3.2 1 M 1&lt;BR /&gt;0.793786648 3.4 1 F 3&lt;BR /&gt;0.807394419 3.6 1 F 2&lt;BR /&gt;0.816466266 3.8 1 F 2&lt;BR /&gt;0.839145885 3.9 1 M 2&lt;BR /&gt;0.884505122 4 1 M 2&lt;BR /&gt;0.90718474 4.1 1 M 3&lt;BR /&gt;0.898112893 4.1 1 M 3&lt;BR /&gt;0.952543977 4.2 1 F 1&lt;BR /&gt;1.006975061 4.3 1 M 1&lt;BR /&gt;0.961615824 4.4 1 M 2&lt;BR /&gt;1.043262451 4.4 1 M 3&lt;BR /&gt;1.315417873 4.5 1 M 2&lt;BR /&gt;1.133980925 4.6 1 M 3&lt;BR /&gt;1.133980925 4.6 1 F 1&lt;BR /&gt;1.179340162 4.6 1 F 1&lt;BR /&gt;1.451495584 5.6 1 F 2&lt;BR /&gt;1.406136347 5.7 1 M 3&lt;BR /&gt;0.816466266 4 1 M 1&lt;BR /&gt;0.861825503 4.3 1 M 2&lt;BR /&gt;0.861825503 4.3 1 M 2&lt;BR /&gt;0.898112893 4.4 1 F 1&lt;BR /&gt;0.893576969 4.4 1 F 3&lt;BR /&gt;0.902648816 4.5 2 F 4&lt;BR /&gt;0.997903214 4.5 2 F 6&lt;BR /&gt;1.043262451 4.6 2 M 6&lt;BR /&gt;0.90718474 4.7 2 M 6&lt;BR /&gt;0.952543977 4.7 2 M 4&lt;BR /&gt;0.902648816 4.7 2 F 4&lt;BR /&gt;0.90718474 4.8 2 M 5&lt;BR /&gt;0.816466266 4.8 2 F 5&lt;BR /&gt;0.807394419 4.8 2 F 5&lt;BR /&gt;0.898112893 4.8 2 M 5&lt;BR /&gt;1.36077711 5 2 F 4&lt;BR /&gt;1.043262451 5 2 M 6&lt;BR /&gt;1.133980925 5 2 M 6&lt;BR /&gt;1.179340162 5 2 F 4&lt;BR /&gt;1.315417873 5.1 2 F 4&lt;BR /&gt;1.301810102 5.1 2 M 4&lt;BR /&gt;1.224699399 5.2 2 M 5&lt;BR /&gt;1.084085764 5.2 2 M 5&lt;BR /&gt;1.451495584 5.2 2 M 6&lt;BR /&gt;1.456031508 5.3 2 M 6&lt;BR /&gt;1.451495584 5.5 2 M 6&lt;BR /&gt;1.406136347 5.5 2 M 5&lt;BR /&gt;1.587573295 5.6 2 M 4&lt;BR /&gt;1.451495584 5.6 2 M 5&lt;BR /&gt;1.36077711 5.6 2 F 4&lt;BR /&gt;1.351705263 6.3 2 M 4&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%include "/home/u60798883/sasuser.v94/danda.sas";&lt;BR /&gt;%reg(pig,WEANWT,BIRTHWT);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then the log showing notes like this:&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class=""&gt;68&lt;/DIV&gt;
&lt;DIV class=""&gt;69 data pig;&lt;/DIV&gt;
&lt;DIV class=""&gt;70 input BIRTHWT WEANWTgroup$sex$litter$ ;&lt;/DIV&gt;
&lt;DIV class=""&gt;71 datalines;&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 72 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 73 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;76 CHAR 0.839145885.3.9.1.M.2&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 0E83914588593E9919D9200000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=0.807394 sex=0.816466 litter=0.839145 _ERROR_=1 _N_=1&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 77 1-19.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 78 1-20.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;81 CHAR 1.006975061.4.3.1.M.1&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 1E00697506194E3919D9100000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=0.898112 sex=0.952543 litter=1.006975 _ERROR_=1 _N_=2&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 82 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 83 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;86 CHAR 1.133980925.4.6.1.F.1&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 1E13398092594E691969100000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=1.315417 sex=1.133980 litter=1.133980 _ERROR_=1 _N_=3&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 87 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 88 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;91 CHAR 0.861825503.4.3.1.M.2&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 0E86182550394E3919D9200000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=1.406136 sex=0.816466 litter=0.861825 _ERROR_=1 _N_=4&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 92 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 93 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;96 CHAR 0.997903214.4.5.2.F.6&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 0E99790321494E592969600000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=0.893576 sex=0.902648 litter=0.997903 _ERROR_=1 _N_=5&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 97 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 98 1-20.&lt;/DIV&gt;
&lt;DIV class=""&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;101 CHAR 0.90718474.4.8.2.M.5&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333330323030403222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 0E9071847494E8929D95000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=0.952543 sex=0.902648 litter=0.907184 _ERROR_=1 _N_=6&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 102 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 103 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;106 CHAR 1.043262451.5.2.M.6&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333030304032222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 1E04326245195929D960000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=0.898112 sex=1.360777 litter=1.043262 _ERROR_=1 _N_=7&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 107 1-19.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 108 1-19.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;111 CHAR 1.224699399.5.2.2.M.5&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 1E22469939995E2929D9500000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=1.315417 sex=1.301810 litter=1.224699 _ERROR_=1 _N_=8&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 112 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 113 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;116 CHAR 1.406136347.5.5.2.M.5&lt;/DIV&gt;
&lt;DIV class=""&gt;ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;
&lt;DIV class=""&gt;NUMR 1E40613634795E5929D9500000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=1.456031 sex=1.451495 litter=1.406136 _ERROR_=1 _N_=9&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for BIRTHWT in line 117 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data for WEANWT in line 118 1-21.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: LOST CARD.&lt;/DIV&gt;
&lt;DIV class=""&gt;121 ;&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;
&lt;DIV class=""&gt;BIRTHWT=. WEANWT=. group=1.360777 sex=1.351705 litter= _ERROR_=1 _N_=10&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: The data set WORK.PIG has 9 observations and 5 variables.&lt;/DIV&gt;
&lt;DIV class=""&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;
&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class=""&gt;user cpu time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class=""&gt;memory 671.09k&lt;/DIV&gt;
&lt;DIV class=""&gt;OS Memory 31460.00k&lt;/DIV&gt;
&lt;DIV class=""&gt;Timestamp 11/02/2022 02:30:21 CH&lt;/DIV&gt;
&lt;DIV class=""&gt;Step Count 139 Switch Count 2&lt;/DIV&gt;
&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;
&lt;DIV class=""&gt;Page Reclaims 91&lt;/DIV&gt;
&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;
&lt;DIV class=""&gt;Voluntary Context Switches 9&lt;/DIV&gt;
&lt;DIV class=""&gt;Involuntary Context Switches 0&lt;/DIV&gt;
&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;
&lt;DIV class=""&gt;Block Output Operations 272&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;121 ;&lt;/DIV&gt;
&lt;DIV class=""&gt;122 run;&lt;/DIV&gt;
&lt;DIV class=""&gt;123&lt;/DIV&gt;
&lt;DIV class=""&gt;124 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class=""&gt;134&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/795671#M415</guid>
      <dc:creator>Dee4</dc:creator>
      <dc:date>2022-02-14T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with reading DATALINES to import data</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796042#M416</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416427"&gt;@Dee4&lt;/a&gt;&amp;nbsp;From your log:&lt;/P&gt;
&lt;PRE&gt;76 CHAR 0.839145885.3.9.1.M.2
ZONE 32333333333032303040322222222222222222222222222222222222222222222222222222222222
NUMR 0E83914588593E9919D9200000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
BIRTHWT=. WEANWT=. &lt;STRONG&gt;group=0.807394&lt;/STRONG&gt; &lt;STRONG&gt;sex=0.816466&lt;/STRONG&gt; &lt;STRONG&gt;litter=0.839145&lt;/STRONG&gt; _ERROR_=1 _N_=1
NOTE: Invalid data for BIRTHWT in line 77 1-19.
NOTE: Invalid data for WEANWT in line 78 1-20.
&lt;/PRE&gt;
&lt;DIV class=""&gt;It looks like your program is skipping to a new line in the DATALINES each time it reads a variable on the INPUT statement:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pig;
input BIRTHWT WEANWT group$ sex$ litter$ ;
datalines;
0.771107029 3.2 1 M 1
0.793786648 3.4 1 F 3
&lt;STRONG&gt;0.807394&lt;/STRONG&gt;419 3.6 1 F 2
&lt;STRONG&gt;0.816466&lt;/STRONG&gt;266 3.8 1 F 2
&lt;STRONG&gt;0.839145&lt;/STRONG&gt;885 3.9 1 M 2
0.884505122 4 1 M 2
0.90718474 4.1 1 M 3
&lt;/CODE&gt;&lt;/PRE&gt;
When I run this code in the SAS Windowing Environment (9.4 M7) the data reads in just fine for me. To further troubleshoot, re-run just the DATA step using the TRUNCOVER option to prevent the input statement going to another line for more data:&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pig;
input BIRTHWT WEANWT group $ sex $ litter $ TRUNCOVER;
datalines;
0.771107029 3.2 1 M 1
0.793786648 3.4 1 F 3
0.807394419 3.6 1 F 2
0.816466266 3.8 1 F 2
0.839145885 3.9 1 M 2
0.884505122 4 1 M 2
0.90718474 4.1 1 M 3
;&lt;/CODE&gt;&lt;/PRE&gt;
I don't think that will fix the problem, but it should help diagnose the issue. If the DATALINES were copied and pasted into the program from a source that was not plain text, there may be unprintable embedded characters causing issues.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796042#M416</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-02-14T14:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with reading DATALINES to import data</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796059#M417</link>
      <description>&lt;P&gt;Read the messages in the log, they should help you understand what is happening.&lt;/P&gt;
&lt;P&gt;Pasting the text into the body of you message instead of using the Insert Code or Insert SAS Code icons scrabbles it a little, but we can probably still figure out what it is saying.&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for BIRTHWT in line 72 1-21.
NOTE: Invalid data for WEANWT in line 73 1-21.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
 
76    &lt;BR /&gt;CHAR  0.839145885.3.9.1.M.2
ZONE  32333333333032303040322222222222222222222222222222222222222222222222222222222222
NUMR  0E83914588593E9919D9200000000000000000000000000000000000000000000000000000000000&lt;/PRE&gt;
&lt;P&gt;So it looks like you text file has tab characters ('09'x) between the values instead of the spaces that you told SAS to look for.&lt;/P&gt;
&lt;P&gt;Try adding an INFILE statement so you can tell SAS to look for the tabs.&amp;nbsp; &amp;nbsp;You should probably also add the DSD option in case there are any missing values that are represented in the file by two adjacent tabs.&amp;nbsp; You should also add the TRUNCOVER option so that you can prevent the other issue the log is showing:&lt;/P&gt;
&lt;PRE&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/PRE&gt;
&lt;P&gt;You could point the INFILE at the in-line data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pig;
  infile datalines dsd dlm='09'x truncover;
  input BIRTHWT WEANWT group $ sex $ litter $ ;
datalines;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But if your source data file has tabs between the values you probably should NOT paste the lines into the program editor as then they might be replaced with spaces.&amp;nbsp; Better to store the data in its own file and point the INFILE statement at that file.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796059#M417</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-14T14:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with reading DATALINES to import data</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796374#M419</link>
      <description>It works!!! Thank you so much!!!</description>
      <pubDate>Tue, 15 Feb 2022 18:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Problem-with-reading-DATALINES-to-import-data/m-p/796374#M419</guid>
      <dc:creator>Dee4</dc:creator>
      <dc:date>2022-02-15T18:49:03Z</dc:date>
    </item>
  </channel>
</rss>

