<?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 multiple external folder names and files in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Reading-multiple-external-folder-names-and-files/m-p/887238#M39370</link>
    <description>&lt;P&gt;You do not seem to use the macro variable id in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway: wrap everything into a macro definition with id as parameter. Create a dataset with all id's. Then call the macro from this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set id_dataset;
call execute(cats('%nrstr(%your_macro(',id,'))'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Aug 2023 05:46:19 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-08-01T05:46:19Z</dc:date>
    <item>
      <title>Reading multiple external folder names and files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-multiple-external-folder-names-and-files/m-p/887235#M39369</link>
      <description>&lt;P&gt;Hello SAS expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following SAS program that uses macro variables to retrieve the folder name for individual cases and processes the data within each case folder. Currently, the program processes one case at a time, and since there are 100 case folders, it becomes impractical to manually select each case.&amp;nbsp; How can I modify the program so that it automatically retrieve the next case and repeat the process until all 100 cases have been handled. Your help is much appreciated.&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of case folder names:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanahch_0-1690865314735.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86321i975F464BEB640CCE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hanahch_0-1690865314735.png" alt="hanahch_0-1690865314735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%LET id=1001B;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** individual case folder name */&lt;/P&gt;&lt;P&gt;%LET folder=C:\DDS;&lt;/P&gt;&lt;P&gt;LIBNAME ddsdata "&amp;amp;folder";&lt;/P&gt;&lt;P&gt;options dlcreatedir;&lt;BR /&gt;libname newdir "&amp;amp;folder/OUTPUT";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /creates folder where processed data will be stored */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* the following lines run DDS programs;&lt;BR /&gt;%INCLUDE "&amp;amp;folder\dssformat.sas";&lt;BR /&gt;%INCLUDE "&amp;amp;folder\dssINPUT.SAS";&lt;BR /&gt;%INCLUDE "&amp;amp;folder\ngaINPUT.SAS";&lt;BR /&gt;%INCLUDE "&amp;amp;folder\ddsmain.SAS";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 05:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-multiple-external-folder-names-and-files/m-p/887235#M39369</guid>
      <dc:creator>hanahch</dc:creator>
      <dc:date>2023-08-01T05:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple external folder names and files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-multiple-external-folder-names-and-files/m-p/887238#M39370</link>
      <description>&lt;P&gt;You do not seem to use the macro variable id in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway: wrap everything into a macro definition with id as parameter. Create a dataset with all id's. Then call the macro from this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set id_dataset;
call execute(cats('%nrstr(%your_macro(',id,'))'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2023 05:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-multiple-external-folder-names-and-files/m-p/887238#M39370</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-01T05:46:19Z</dc:date>
    </item>
  </channel>
</rss>

