<?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: Invalid datalines in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692885#M211173</link>
    <description>&lt;P&gt;Datalines requires that the block end with a semicolon, or 4 semicolons if using datalines4, as the only character&lt;/P&gt;
&lt;P&gt;your last of data values should NOT have the semicolon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste code, especially involving datalines, and log entries on the forum into a code box opened with the &amp;lt;/&amp;gt; icon. Otherwise the message window will reformat the text and likely have something other that your actual code/ datalines values.&lt;/P&gt;
&lt;P&gt;This code:&lt;/P&gt;
&lt;PRE&gt;data wrong;
  input x y;
datalines;
1 2
3 4;&lt;/PRE&gt;
&lt;P&gt;generates this log:&lt;/P&gt;
&lt;PRE&gt;158  data wrong;
159    input x y;
160  datalines;

NOTE: The data set WORK.WRONG has 1 observations and 2
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


162  3 4;
     -
     180

ERROR 180-322: Statement is not valid or it is used out of
               proper order.

&lt;/PRE&gt;
&lt;P&gt;This doesn't:&lt;/P&gt;
&lt;PRE&gt;data right;
  input x y;
datalines;
1 2
3 4
;
&lt;/PRE&gt;
&lt;PRE&gt;164  data right;
165    input x y;
166  datalines;

NOTE: The data set WORK.RIGHT has 2 observations and 2
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


169  ;

&lt;/PRE&gt;
&lt;P&gt;other common problems with datalines comes from not starting data on the left boundary, blank lines and attempting to use stuff copied from non-plain text sources that can have not shown characters that affect the program (copying from websites where HTML characters are embedded or word processing documents for example )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2020 14:26:47 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-10-20T14:26:47Z</dc:date>
    <item>
      <title>Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692817#M211133</link>
      <description>&lt;P&gt;My observation number is being limited by an error. The code and results are below. I have back tracked the lines mention but I have been unsuccessful in finding the flaw in the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data SsamPAHan;&lt;BR /&gt;Input Site $ Ace Anthra Benzoaa Benzoapy&lt;BR /&gt;Benzobflu Benzoghi Benzokfluo Chry&lt;BR /&gt;Dibenzo Fluoran Fluorene Indeno123&lt;BR /&gt;Phen Pyr;&lt;BR /&gt;Datalines;&lt;BR /&gt;LC 0 0 0.024266667 0.015533333 0.02602 0.008633333 0.010333333 0.0172333330 0.006366667 0.041333333 0.016933333 0.023333333 0.053833333&lt;BR /&gt;SK1 0.004966667 0.004966667 0.0078 0.005666667 0.008533333 0 0 0.0078 0 0 0.003566667 0.003566667 0.008593333 0.027133333&lt;BR /&gt;WR1 0.0042 0.0077 0.04 0.0175 0.02539 0.0063 0.0091 0.0224 0 0 0 0.0091 0.018216667 0.093156667&lt;BR /&gt;WR2 0 0 0.00595 0.00595 0.011833333 0.0042 0.00345 0.005326667 0.002176667 0 0 0.003733333 0.006066667 0.013743333&lt;BR /&gt;PI 0 0 0 0 0 0 0 0 0 0 0 0 0.006003333 0;&lt;BR /&gt;Proc Univariate Normaltest;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Log Comments below:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;83 PI 0 0 0 0 0 0 0 0 0 0 0 0 0.006003333 0;&lt;BR /&gt;__&lt;BR /&gt;180&lt;BR /&gt;&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;&lt;BR /&gt;84 Proc Univariate Normaltest;&lt;BR /&gt;85 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: PROCEDURE UNIVARIATE used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 11:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692817#M211133</guid>
      <dc:creator>rjinks</dc:creator>
      <dc:date>2020-10-20T11:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692820#M211136</link>
      <description>&lt;P&gt;Can you please show us the log by preserving the formatting that exists? You do this by copying the log as text and pasting it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. This makes everything easier to read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please show us the entire log for this DATA step, not selected portions of the log. We need to see the code in the log, the NOTEs, ERRORs and WARNINGs, with nothing edited or chopped out.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 11:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692820#M211136</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-20T11:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692852#M211158</link>
      <description>&lt;P&gt;Your last data line has a terminating semi-colon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Move the semi-colon to be on the next source code line by itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Data SsamPAHan;
Input Site $ Ace Anthra Benzoaa Benzoapy
Benzobflu Benzoghi Benzokfluo Chry
Dibenzo Fluoran Fluorene Indeno123
Phen Pyr;
Datalines;
LC 0 0 0.024266667 0.015533333 0.02602 0.008633333 0.010333333 0.0172333330 0.006366667 0.041333333 0.016933333 0.023333333 0.053833333
SK1 0.004966667 0.004966667 0.0078 0.005666667 0.008533333 0 0 0.0078 0 0 0.003566667 0.003566667 0.008593333 0.027133333
WR1 0.0042 0.0077 0.04 0.0175 0.02539 0.0063 0.0091 0.0224 0 0 0 0.0091 0.018216667 0.093156667
WR2 0 0 0.00595 0.00595 0.011833333 0.0042 0.00345 0.005326667 0.002176667 0 0 0.003733333 0.006066667 0.013743333
PI 0 0 0 0 0 0 0 0 0 0 0 0 0.006003333 0;   &amp;lt;----------------- PLACEMENT OF SEMICOLON IS WRONG
&lt;/PRE&gt;
&lt;P&gt;Last line should be&lt;/P&gt;
&lt;PRE&gt;PI 0 0 0 0 0 0 0 0 0 0 0 0 0.006003333 0
;
&lt;/PRE&gt;
&lt;P&gt;If your actual data is as posted then some of the data lines are incomplete with regard to INPUT.&amp;nbsp; You might want to add&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;infile cards missover;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to the DATA Step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 13:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692852#M211158</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-10-20T13:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692859#M211160</link>
      <description>&lt;P&gt;Your first dataline has only 13 numeric values, but your code tries to read 14. Use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile datalines truncover;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as your first data step statement to prevent the skip to the next line.&lt;/P&gt;
&lt;P&gt;Also move the semicolon that ends the DATALINES block to its own line.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 13:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692859#M211160</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-20T13:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692885#M211173</link>
      <description>&lt;P&gt;Datalines requires that the block end with a semicolon, or 4 semicolons if using datalines4, as the only character&lt;/P&gt;
&lt;P&gt;your last of data values should NOT have the semicolon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste code, especially involving datalines, and log entries on the forum into a code box opened with the &amp;lt;/&amp;gt; icon. Otherwise the message window will reformat the text and likely have something other that your actual code/ datalines values.&lt;/P&gt;
&lt;P&gt;This code:&lt;/P&gt;
&lt;PRE&gt;data wrong;
  input x y;
datalines;
1 2
3 4;&lt;/PRE&gt;
&lt;P&gt;generates this log:&lt;/P&gt;
&lt;PRE&gt;158  data wrong;
159    input x y;
160  datalines;

NOTE: The data set WORK.WRONG has 1 observations and 2
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


162  3 4;
     -
     180

ERROR 180-322: Statement is not valid or it is used out of
               proper order.

&lt;/PRE&gt;
&lt;P&gt;This doesn't:&lt;/P&gt;
&lt;PRE&gt;data right;
  input x y;
datalines;
1 2
3 4
;
&lt;/PRE&gt;
&lt;PRE&gt;164  data right;
165    input x y;
166  datalines;

NOTE: The data set WORK.RIGHT has 2 observations and 2
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


169  ;

&lt;/PRE&gt;
&lt;P&gt;other common problems with datalines comes from not starting data on the left boundary, blank lines and attempting to use stuff copied from non-plain text sources that can have not shown characters that affect the program (copying from websites where HTML characters are embedded or word processing documents for example )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 14:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692885#M211173</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-20T14:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692989#M211230</link>
      <description>Thank you I obtained the results.</description>
      <pubDate>Tue, 20 Oct 2020 19:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692989#M211230</guid>
      <dc:creator>rjinks</dc:creator>
      <dc:date>2020-10-20T19:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692991#M211231</link>
      <description>&lt;P&gt;Thank you. I obtained the results.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 19:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692991#M211231</guid>
      <dc:creator>rjinks</dc:creator>
      <dc:date>2020-10-20T19:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692992#M211232</link>
      <description>&lt;P&gt;Thank you for the suggestions.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 19:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-datalines/m-p/692992#M211232</guid>
      <dc:creator>rjinks</dc:creator>
      <dc:date>2020-10-20T19:23:15Z</dc:date>
    </item>
  </channel>
</rss>

