<?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 How to get all the columns from  CSV file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357372#M83880</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am infant to SAS and this is my first post on SAS ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uploaded CSV file to one of my folder and also able to read the data from csv file .,But I would like to get all the columns of CSV file .Can any one help me how can I do it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data tableau;
 infile '/folders/myfolders/DataFiles/SuperstoreSales.csv' delimiter=',' firstobs=2 ;
  input RowID OrderID Order Date$ Profit$;
 run;
 
 proc print data=tableau;
 run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 04:23:44 GMT</pubDate>
    <dc:creator>siddiqalimd</dc:creator>
    <dc:date>2017-05-10T04:23:44Z</dc:date>
    <item>
      <title>How to get all the columns from  CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357372#M83880</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am infant to SAS and this is my first post on SAS ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uploaded CSV file to one of my folder and also able to read the data from csv file .,But I would like to get all the columns of CSV file .Can any one help me how can I do it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data tableau;
 infile '/folders/myfolders/DataFiles/SuperstoreSales.csv' delimiter=',' firstobs=2 ;
  input RowID OrderID Order Date$ Profit$;
 run;
 
 proc print data=tableau;
 run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 04:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357372#M83880</guid>
      <dc:creator>siddiqalimd</dc:creator>
      <dc:date>2017-05-10T04:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the columns from  CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357373#M83881</link>
      <description>&lt;P&gt;How many columns do you have in the csv file?&lt;/P&gt;
&lt;P&gt;According to your INPUT statement you get at most 5 colums.&lt;/P&gt;
&lt;P&gt;If there are more - assign names and informats to the other columns too.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 04:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357373#M83881</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-05-10T04:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the columns from  CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357382#M83887</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not use Proc IMPORT, like so&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import
  file="/folders/myfolders/DataFiles/SuperstoreSales.csv"
  out=tableau
  dbms=csv
  replace
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 05:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357382#M83887</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-05-10T05:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the columns from  CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357391#M83892</link>
      <description>Thanks for your perfect .Blaze answer</description>
      <pubDate>Wed, 10 May 2017 07:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357391#M83892</guid>
      <dc:creator>siddiqalimd</dc:creator>
      <dc:date>2017-05-10T07:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the columns from  CSV file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357400#M83898</link>
      <description>&lt;P&gt;Do bear in mind that with the simplicity of proc import, you do lose the fine grained control you had with the datastep. &amp;nbsp;For simple tasks proc import may work, but under the hood what it is doing is scanning the file and guessing what the best way to read data in. &amp;nbsp;It may/may not get this right (causing you further work), and it may not do the same thing if the data changes in any way. &amp;nbsp;Once you move from simple tasks I would really advise that you put a bit more effort into the import, write the datastep yourself (you can take the output from proc import which will be in the log and modify that to your needs), this way you know exactly how the data will import each time. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 08:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-all-the-columns-from-CSV-file/m-p/357400#M83898</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-10T08:57:57Z</dc:date>
    </item>
  </channel>
</rss>

