<?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 Import csv files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-csv-files/m-p/666803#M199573</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Evening&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to import multiple csv files as a single dataset&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2020 12:36:10 GMT</pubDate>
    <dc:creator>BrahmanandaRao</dc:creator>
    <dc:date>2020-07-03T12:36:10Z</dc:date>
    <item>
      <title>Import csv files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-csv-files/m-p/666803#M199573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Evening&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to import multiple csv files as a single dataset&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 12:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-csv-files/m-p/666803#M199573</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2020-07-03T12:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import csv files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-csv-files/m-p/666805#M199574</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Evening&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to import multiple csv files as a single dataset&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Don't "import" them.&amp;nbsp; Instead just read them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will assume they all have the same structure, otherwise why are you putting them into a single dataset?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   length fname filename $256 ;
   input '/mydir/*.csv' filename=fname dsd truncover ;
   input @;
   if fname ne lag(fname) then input ;
   input  .... ;
   filename=fname;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just replace the 'input ....' statement with the code to read your variables.&amp;nbsp; So you might want to first use LENGTH statement to define the variable before the INPUT statement.&amp;nbsp; Also you might want to add FORMAT and/or LABEL statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 12:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-csv-files/m-p/666805#M199574</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-03T12:41:37Z</dc:date>
    </item>
  </channel>
</rss>

