<?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: Incomplete rows when using SAS university edition in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709523#M26719</link>
    <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;The "turnover" was exactly what fixed the problem.&lt;/P&gt;&lt;P&gt;However, in the last variable, "AMB$," the values are not displayed in SAS.&lt;/P&gt;&lt;P&gt;Any other recommendations?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 22:57:39 GMT</pubDate>
    <dc:creator>lih428</dc:creator>
    <dc:date>2021-01-05T22:57:39Z</dc:date>
    <item>
      <title>Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709494#M26713</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I started working with SAS University edition in my graduate class.&lt;/P&gt;&lt;P&gt;I had a problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I create the library and save a SAS system file, the CVS dataset shows incomplete rows.&lt;/P&gt;&lt;P&gt;In the original CVS dataset, I have 100 observation, when it's opened in SAS, only shows 50 observation. All the variables are included in the SAS dataset.&lt;/P&gt;&lt;P&gt;This is the code that I am using.&lt;/P&gt;&lt;PRE&gt;libname lib2021 '/folders/myfolders';&lt;BR /&gt;&lt;BR /&gt;data lib2021.ambEEG1;&lt;BR /&gt;infile '/folders/myfolders/Ambulatory/AmbulatorySASquestion.csv' dsd&lt;BR /&gt;dlm=',' firstobs=2;&lt;BR /&gt;input FRST$ SECMD$ FUweeksnew CENSORED OUTCOME2 SEX AgeSUS AgeSUS Agegroups2$ FAMHISEPI$ FEBRSZ$ STROKE$ HTN$ BRAINTMR$ HEADTRM$ Devlpmtldisab$ PSYCH$ CONFUS$ INCONTNCE$ NOCTURSZ$ TNGBITT$ AUTOMATS$ IMAGINE$ AMB$;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;Please find the CVS dataset. and a picture of the SAS table properties after&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QuestionSAScommunity.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53228i35038EBD852936F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QuestionSAScommunity.png" alt="QuestionSAScommunity.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&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>Tue, 05 Jan 2021 20:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709494#M26713</guid>
      <dc:creator>lih428</dc:creator>
      <dc:date>2021-01-05T20:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709495#M26714</link>
      <description>&lt;P&gt;Please show the LOG entry for the data step in question. Copy the entire text including all messages and notes. Paste into a text box opened on the forum with the &amp;lt;/&amp;gt; icon to preserve formatting of text and any diagnostic messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If possible copy the first 5 to 10 lines from the CSV and paste into a text box as well. When doing this &lt;STRONG&gt;do not copy from spreadsheet software.&lt;/STRONG&gt; Open the file with a plain text program like the Notepad or even the SAS editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If any of your records do not have all 25 columns you need to tell SAS that may happen. If you get notes in the log about "SAS continued to the next line" then that can cause incomplete data though usually one or more of your variables will have data that are inconsistent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With one of your variables duplicated on the INPUT statement you may have more variables than columns of data, which would cause the above mentioned problem. At a minimum this reads two sequential values into a single variable and you only have one resulting value kept in the data.&lt;/P&gt;
&lt;PRE&gt;input FRST$ SECMD$ FUweeksnew CENSORED OUTCOME2 SEX &lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;AgeSUS AgeSUS&lt;/STRONG&gt;&lt;/FONT&gt; Agegroups2$ FAMHISEPI$ FEBRSZ$ STROKE$ HTN$ BRAINTMR$ HEADTRM$ Devlpmtldisab$ PSYCH$ CONFUS$ INCONTNCE$ NOCTURSZ$ TNGBITT$ AUTOMATS$ IMAGINE$ AMB$;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 20:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709495#M26714</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-05T20:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709496#M26715</link>
      <description>&lt;P&gt;1) Please post the full log of running code and the csv file as is.&lt;/P&gt;
&lt;P&gt;2) You assigned&amp;nbsp;&lt;STRONG&gt;dlm=','&lt;/STRONG&gt; but the csv file you posted is either tab limited or an excel view.&lt;/P&gt;
&lt;P&gt;3) Try add option&amp;nbsp;&lt;STRONG&gt;truncover&lt;/STRONG&gt; to the&amp;nbsp;&lt;STRONG&gt;infile&lt;/STRONG&gt; statement.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 20:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709496#M26715</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-05T20:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709499#M26716</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;1) Please post the full log of running code and the csv file as is.&lt;/P&gt;
&lt;P&gt;2) You assigned&amp;nbsp;&lt;STRONG&gt;dlm=','&lt;/STRONG&gt; but the csv file you posted is either tab limited or an excel view.&lt;/P&gt;
&lt;P&gt;3) Try add option&amp;nbsp;&lt;STRONG&gt;truncover&lt;/STRONG&gt; to the&amp;nbsp;&lt;STRONG&gt;infile&lt;/STRONG&gt; statement.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The file is a CSV file, but the viewer that this forum uses for CSV files does not show the text of the file. Instead it displays it in a spreadsheet layout.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 20:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709499#M26716</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-05T20:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709502#M26717</link>
      <description>&lt;P&gt;The INPUT statement read 24 values into 23 variables.&amp;nbsp; Since the lines only have 23 values without the TRUNCOVER option it will read two lines for every observation processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just removing the duplicate variable name should fix the issue.&lt;/P&gt;
&lt;P&gt;But adding TRUNCOVER to the INFILE statement is also a good idea in case there are any short lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure why you are reading all of the variables as character strings. The values all look like numbers to me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename csv 'c:\downloads\AmbulatorySASquestion.csv' ;
filename header temp;

data _null_;
  infile csv dsd obs=1 ;
  file header ;
  if _n_ = 1 then put 'input ' @;
  input name :$32. @@ ;
  put name @;
run;

data ambEEG1;
  infile csv dsd firstobs=2 truncover ;
%include header / source2;
  ;
run;

proc print data=ambEEG1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;103   data ambEEG1;
104     infile csv dsd firstobs=2 truncover ;
105   %include header / source2;
NOTE: %INCLUDE (level 1) file HEADER is file ...\#LN00061.
106  +input FRST SECMD FUweeksnew CENSORED OUTCOME2 SEX AgeSUS Agegroups2 FAMHISEPI FEBRSZ STROKE HTN
106 !+BRAINTMR HEADTRM Devlpmtldisab PSYCH CONFUS INCONTNCE NOCTURSZ TNGBITT AUTOMATS Imagine AMB
NOTE: %INCLUDE (level 1) ending.
107     ;
108   run;
NOTE: 100 records were read from the infile CSV.
      The minimum record length was 46.
      The maximum record length was 48.
NOTE: The data set WORK.AMBEEG1 has 100 observations and 23 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 05 Jan 2021 22:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709502#M26717</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-05T22:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709517#M26718</link>
      <description>&lt;P&gt;THANK YOU!!!!!&lt;/P&gt;&lt;P&gt;I added "trunkover" after "dsd" and I have the full dataset!!!!!!!!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 22:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709517#M26718</guid>
      <dc:creator>lih428</dc:creator>
      <dc:date>2021-01-05T22:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709523#M26719</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;The "turnover" was exactly what fixed the problem.&lt;/P&gt;&lt;P&gt;However, in the last variable, "AMB$," the values are not displayed in SAS.&lt;/P&gt;&lt;P&gt;Any other recommendations?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 22:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709523#M26719</guid>
      <dc:creator>lih428</dc:creator>
      <dc:date>2021-01-05T22:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709525#M26720</link>
      <description>Make sure to delete the duplicate AgeSUS from the INPUT statement as well, otherwise I'm not even sure what SAS would do with your data at that point.</description>
      <pubDate>Tue, 05 Jan 2021 23:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709525#M26720</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-05T23:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete rows when using SAS university edition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709527#M26722</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The INPUT statement read 24 values into 23 variables.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Remove the duplicate variable name from the INPUT statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input FRST SECMD FUweeksnew CENSORED OUTCOME2 SEX 
      AgeSUS Agegroups2 FAMHISEPI FEBRSZ STROKE HTN
      BRAINTMR HEADTRM Devlpmtldisab PSYCH CONFUS INCONTNCE
      NOCTURSZ TNGBITT AUTOMATS Imagine AMB 
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jan 2021 23:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incomplete-rows-when-using-SAS-university-edition/m-p/709527#M26722</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-05T23:04:39Z</dc:date>
    </item>
  </channel>
</rss>

