<?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 Save a file in external file in sas7bdat format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693703#M211564</link>
    <description>&lt;P&gt;An excel file - 'ABC.xlsx' already exists in an external folder. Requirement is to save the same file in the same location but in sas7bdat format.&lt;/P&gt;&lt;P&gt;I dont want to use the PROC IMPORT process as it will be lengthy process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please guide how effectively this can be done in SAS for multiple files stored in different locations.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 23 Oct 2020 11:57:22 GMT</pubDate>
    <dc:creator>San_rise</dc:creator>
    <dc:date>2020-10-23T11:57:22Z</dc:date>
    <item>
      <title>Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693703#M211564</link>
      <description>&lt;P&gt;An excel file - 'ABC.xlsx' already exists in an external folder. Requirement is to save the same file in the same location but in sas7bdat format.&lt;/P&gt;&lt;P&gt;I dont want to use the PROC IMPORT process as it will be lengthy process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please guide how effectively this can be done in SAS for multiple files stored in different locations.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 11:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693703#M211564</guid>
      <dc:creator>San_rise</dc:creator>
      <dc:date>2020-10-23T11:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693712#M211567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252883"&gt;@San_rise&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your high-level requirements you could try the following high-level steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For each .xlsx file location:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Allocate a library pointing to the same location.&lt;/LI&gt;
&lt;LI&gt;Read in a previously unread .xlsx file&amp;nbsp;using your preferred method, creating an output SAS data set to the library allocated in step #1.&lt;/LI&gt;
&lt;LI&gt;If there is another unread .xls file in the same location then go back to step #2.&lt;/LI&gt;
&lt;LI&gt;Unassign the current library.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693712#M211567</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2020-10-23T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693715#M211569</link>
      <description>&lt;P&gt;Code dealing with multiple excel-files is hardly effective, caused by the nature of the excel-file-format. Convert all files to csv and - if they have the same structure - importing them is easy.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693715#M211569</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-10-23T12:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693778#M211576</link>
      <description>This was the first thought that I had but due to different file types from multiple system paths I need to assign multiple libraries and then read each individual files and move them to the created library. It is a time taking job.</description>
      <pubDate>Fri, 23 Oct 2020 15:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693778#M211576</guid>
      <dc:creator>San_rise</dc:creator>
      <dc:date>2020-10-23T15:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693784#M211577</link>
      <description>&lt;P&gt;Any %macro %mend that can involve this diversity and just punching in the different paths and filenames. Any suggestion if I want to proceed with that how the syntax need to be framed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: Location 1 --&amp;gt; File1.xlsx, File2.csv, File3.xlsb&lt;/P&gt;&lt;P&gt;Location 2 --&amp;gt; File4.csv&lt;/P&gt;&lt;P&gt;Location 3 --&amp;gt; File5.xlsx&lt;/P&gt;&lt;P&gt;Any best way wherein I can automate this in terms of importing them in SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 15:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/693784#M211577</guid>
      <dc:creator>San_rise</dc:creator>
      <dc:date>2020-10-23T15:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/694207#M211701</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252883"&gt;@San_rise&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try considering the following method:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Define one macro per file-type that has to be read. Each macro should have parameters for: the input file location; the input file name; the output SAS library name; the output SAS data set name.&lt;/LI&gt;
&lt;LI&gt;Assign a SAS library pointing to the location of your files.&lt;/LI&gt;
&lt;LI&gt;For each file in the location, call the matching file-type macro to read the file (passing the parameter details).&lt;/LI&gt;
&lt;LI&gt;Unassign the current library.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;If there is another location then go back to step #2.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 10:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/694207#M211701</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2020-10-26T10:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Save a file in external file in sas7bdat format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/698319#M213552</link>
      <description>&lt;P&gt;Thank you Amir. This does the work I was looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 06:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Save-a-file-in-external-file-in-sas7bdat-format/m-p/698319#M213552</guid>
      <dc:creator>San_rise</dc:creator>
      <dc:date>2020-11-12T06:46:09Z</dc:date>
    </item>
  </channel>
</rss>

