<?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: Datalines only reading first observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557330#M155350</link>
    <description>&lt;P&gt;How are you submitting the code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using interactive SAS (aka Display Manager)?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Enterprise Guide?&lt;/P&gt;
&lt;P&gt;SAS/Studio?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running from the command line using a source file with the SAS code?&amp;nbsp; What editor did you use to create the program file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What version of SAS are you running?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What operating system is SAS running on (not where EG or SAS/Studio is running but where the SAS server they are connected to is running).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 00:13:24 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-05-09T00:13:24Z</dc:date>
    <item>
      <title>Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557319#M155343</link>
      <description>&lt;P&gt;I'm sure this is an easy one and I'm doing something dumb, but for some reason I can only get the first line into the work.have dataset. What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data WORK.have;
   infile datalines dsd truncover;
   input Name:$20. Car:$30. Date_of_Service: mmddyy10.;
   format Date_of_service mmddyy10.;
 datalines;
Henry O'Toole, '86 Chevy Celebrity, 01052018
Henry O'Toole, '86 Chevy Celebrity, 04092018
Henry O'Toole, '86 Chevy Celebrity, 07122018
Henry O'Toole, '86 Chevy Celebrity, 10142018
Henry O'Toole, '07 Toyota Prius, 01162018
Henry O'Toole, '07 Toyota Prius, 04202018
Henry O'Toole, '07 Toyota Prius, 07232018
Henry O'Toole, '07 Toyota Prius, 10252018
Kathleen Boberts, '96 Honda Accord, 01272018
Kathleen Boberts, '96 Honda Accord, 05012018
Kathleen Boberts, '96 Honda Accord, 08032018
Kathleen Boberts, '96 Honda Accord, 11052018

 ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 May 2019 23:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557319#M155343</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2019-05-08T23:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557326#M155347</link>
      <description>&lt;P&gt;When I run your code I get 13 rows of data, including a final one with all missing values (poor form in data lines to have blank line).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, that is after copy and paste into a different system.&lt;/P&gt;
&lt;P&gt;I see that your pasted code shows a yellow highlight before the word datalines and the semicolon following, plus the semicolon ending the datalines is highlighted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That &lt;STRONG&gt;may&lt;/STRONG&gt; indicate some sort of not normally visible character has snuck into your code. This sometimes happens when copying code from other sources.&lt;/P&gt;
&lt;P&gt;Try deleting the entire line with datalines; and retyping from scratch. Do the same with the ending semicolon and remove the blank line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then try rerunning the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 23:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557326#M155347</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-08T23:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557330#M155350</link>
      <description>&lt;P&gt;How are you submitting the code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using interactive SAS (aka Display Manager)?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Enterprise Guide?&lt;/P&gt;
&lt;P&gt;SAS/Studio?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running from the command line using a source file with the SAS code?&amp;nbsp; What editor did you use to create the program file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What version of SAS are you running?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What operating system is SAS running on (not where EG or SAS/Studio is running but where the SAS server they are connected to is running).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 00:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557330#M155350</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-09T00:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557464#M155409</link>
      <description>&lt;DIV class="lia-page"&gt;&lt;CENTER&gt;&lt;DIV class="MinimumWidthContainer"&gt;&lt;DIV class="min-width-wrapper"&gt;&lt;DIV class="min-width"&gt;&lt;DIV class="lia-content"&gt;&lt;DIV class="lia-quilt lia-quilt-forum-topic-page lia-quilt-layout-two-column-main-side lia-top-quilt"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-header"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-left lia-quilt-column-main-content"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-component-message-list"&gt;&lt;DIV class="linear-message-list message-list"&gt;&lt;DIV class="lia-linear-display-message-view"&gt;&lt;DIV&gt;&lt;DIV class="lia-message-view message-uid-557462"&gt;&lt;DIV&gt;&lt;DIV class="lia-js-resize-images lia-component-forums-widget-board-message-view"&gt;&lt;DIV&gt;&lt;DIV class="lia-message-board lia-panel-message lia-js-data-messageUid-557462"&gt;&lt;DIV class="lia-panel-message-content"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-content"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="lia-quilt lia-quilt-forum-message lia-quilt-layout-forum-message"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-main"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-message-body lia-component-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I'm using SAS Enterprise Guide, and submitting the code using the "Run Selection" option. I used the Generic SAS Editor to create the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current version: 9.04.01M5P091317&lt;/P&gt;&lt;P&gt;Operating System: LIN X64&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/CENTER&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 May 2019 14:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557464#M155409</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2019-05-09T14:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557465#M155410</link>
      <description>&lt;P&gt;Haha, I copied from&amp;nbsp;&lt;EM&gt;your&lt;/EM&gt; code! I will try running it on Base SAS instead of EG.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;"Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Edit:&amp;nbsp;This code IS working in Base SAS (after deleting the space at the end), but is NOT working in EG. In EG, it only outputs the first observation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 14:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557465#M155410</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2019-05-09T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Datalines only reading first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557485#M155414</link>
      <description>&lt;P&gt;Post the log from when you try to run it.&amp;nbsp; Copy the lines from the log and paste them into this forum using the pop-up window that appears when you use the Insert Code icon (looks like {i} on the menu bar) to preserve the relative positions of the characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few things to check.&lt;/P&gt;
&lt;P&gt;1) Make sure to get a fresh SAS session for your EG.&amp;nbsp; Perhaps earlier code has left SAS in an unstable state and the code you are submitting is not being seen be SAS properly.&amp;nbsp; You might have submitted unbalanced quotes. You might have set system option OBS to 1.&lt;/P&gt;
&lt;P&gt;2) Make a new simple data step that reads from datalines and type it into the EG editor by hand.&amp;nbsp; Does that work?&lt;/P&gt;
&lt;P&gt;3) Copy the code out of EG into a simple text editor like Windows Notepad and make sure that it is not all one long line.&amp;nbsp; Perhaps the EG editor is just wrapping the long lines to make it look like there are multiple lines?&amp;nbsp; Then paste it back into EG.&lt;/P&gt;
&lt;P&gt;4) Re type the program and two or more lines of data by hand into EG and try running that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 15:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Datalines-only-reading-first-observation/m-p/557485#M155414</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-09T15:24:40Z</dc:date>
    </item>
  </channel>
</rss>

