<?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: CSV TO DATASET in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179918#M45898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add guessingrows=32000 option if you must use proc import. There is a default number of rows SAS will use to determine type and length of variables. If you have longer text after that number of rows then it is likely to get truncated. The guessingrows option tells SAS to look at more lines before setting type and length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 15:11:01 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-08-29T15:11:01Z</dc:date>
    <item>
      <title>CSV TO DATASET</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179915#M45895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have CSV file. I am importing into SAS dataset using proc import but as result some of the data is truncated…can someone suggest if there is any better way importing……&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT=mydata&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; DATAFILE="/c/clean.csv"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=CSV REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delimiter = ";";&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2;&lt;/P&gt;&lt;P&gt; RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 12:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179915#M45895</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2014-08-29T12:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: CSV TO DATASET</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179916#M45896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, use datastep (there are lots of examples on the communities):&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length var1-var4 $10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "c:\clean/.csv" dsd missover dlm="," lrecl=32767; /* Change DLM to semicolon if needed */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var1 $ var2 $ var3 $ var4 $;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Obviously change the varx and format to what it is in your data, i.e. if you have dates and things, add formats, informats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 12:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179916#M45896</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-08-29T12:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: CSV TO DATASET</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179917#M45897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;rakeshvvv wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;some of the data is truncated…&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Seems a bit vague.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 13:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179917#M45897</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-08-29T13:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: CSV TO DATASET</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179918#M45898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add guessingrows=32000 option if you must use proc import. There is a default number of rows SAS will use to determine type and length of variables. If you have longer text after that number of rows then it is likely to get truncated. The guessingrows option tells SAS to look at more lines before setting type and length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 15:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CSV-TO-DATASET/m-p/179918#M45898</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-08-29T15:11:01Z</dc:date>
    </item>
  </channel>
</rss>

