<?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: Reading in a .csv file: a period added to a variable? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102790#M28777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could be an informat issue.&amp;nbsp; Take a look at your INFORMAT for that field.&amp;nbsp; Can we see your INPUT statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 18:26:52 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2013-04-09T18:26:52Z</dc:date>
    <item>
      <title>Reading in a .csv file: a period added to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102789#M28776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to reading in a .csv file, but getting an error message on reading in one variable.&amp;nbsp; The variable is a person's ID number.&amp;nbsp; When I read in the file using an infile statement, I see a note saying that "Invalid data for this variable." In the log, I see a period added to this variable, which does not exist in the original .csv file.&amp;nbsp; For instance, I see "84031563578"&amp;nbsp; in the .csv file, but I see ".84031563578" in the SAS log instead.&amp;nbsp; I don't know where this period came from.&amp;nbsp; Can anyone suggest how I can fix this problem?&amp;nbsp; Thank you!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SJK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 17:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102789#M28776</guid>
      <dc:creator>ksio21008</dc:creator>
      <dc:date>2013-04-09T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a .csv file: a period added to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102790#M28777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could be an informat issue.&amp;nbsp; Take a look at your INFORMAT for that field.&amp;nbsp; Can we see your INPUT statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 18:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102790#M28777</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-04-09T18:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a .csv file: a period added to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102791#M28778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Id.Number" indicates that the column contains only digits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a far-out suggestion:&lt;/P&gt;&lt;P&gt;Compare your id to&lt;/P&gt;&lt;P&gt;%Put SysMaxLong:&amp;amp;SysMaxLong;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps your id.numbers are greater than SAS can represent&lt;/P&gt;&lt;P&gt;which causes it to place the 'number' in a decimal format such as you are seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appropriately it ought to have a leading zero: 0.84031563578&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next: 64-bit SAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron Fehd&amp;nbsp; id maven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 21:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102791#M28778</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2013-04-09T21:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a .csv file: a period added to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102792#M28779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all!&amp;nbsp; I fixed an informat statement, and now it works!&amp;nbsp; I also assigned a proper number of places for the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I got a new problem.&amp;nbsp; I have a series of data sets - 11 data sets that represent a data set from each month from Feb 2012 to Dec 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to read in all files at once by using the FILENAME statement, for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FILENAME indat (&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'C:\Users\sjk845\Desktop\data\feb2012.csv'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'C:\Users\sjk845\Desktop\data\dec2012.csv'&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and refer indat in my INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA all;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; INFILE indat DSD TRUNCOVER FIRSTOBS=2 TERMSTR=CR;&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that it treats the header from files other than the first referred file (i.e., mar2012 - dec2012) as observation and gives me an error message.&amp;nbsp; For example, it reads the first row of the March data as an observation, which is in fact the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I make 11 different INFILE statements for data for each month?&amp;nbsp; Is there an optional syntax in the FILENAME statement that I can specify that the first row of each external files should be treated as header?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SJK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 21:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-in-a-csv-file-a-period-added-to-a-variable/m-p/102792#M28779</guid>
      <dc:creator>ksio21008</dc:creator>
      <dc:date>2013-04-09T21:37:32Z</dc:date>
    </item>
  </channel>
</rss>

