<?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 SAS DI (Data Integration): Creation of Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-DI-Data-Integration-Creation-of-Macro/m-p/188511#M35632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a program in SAS Data Integration that will extract a .txt file named TBDET_MMDDYYYY (MM=Month, DD=DAY, YYYY=Year. Example TBDET_04212014)&amp;nbsp; to create a new table named NEW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the steps that I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/6061_pastedImage_0.png" style="width: 627px; height: 87px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The properties of TBDET_MMDDYYYY under File Location Tab is indicated below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everytime I run this program, I need to edit the properties of TBDET_MMDDYYYY under File Location Tab by renaming TBDET_MMDDYYYY.txt under File name.&lt;/P&gt;&lt;P&gt;For example, if the latest .txt file is TBDET_04222014.txt I need to rename the file name from&lt;STRONG&gt; E:\Personal\RAW\TBDET_04212014.txt&lt;/STRONG&gt; to &lt;STRONG&gt;E:\Personal\RAW\TBDET_04222014.txt.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way in SAS DI wherein I don't need to update the file name anymore everytime there is a new data? Creating a macro perhaps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 09:40:53 GMT</pubDate>
    <dc:creator>01SASUser</dc:creator>
    <dc:date>2014-04-22T09:40:53Z</dc:date>
    <item>
      <title>SAS DI (Data Integration): Creation of Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-DI-Data-Integration-Creation-of-Macro/m-p/188511#M35632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a program in SAS Data Integration that will extract a .txt file named TBDET_MMDDYYYY (MM=Month, DD=DAY, YYYY=Year. Example TBDET_04212014)&amp;nbsp; to create a new table named NEW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the steps that I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/6061_pastedImage_0.png" style="width: 627px; height: 87px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The properties of TBDET_MMDDYYYY under File Location Tab is indicated below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://communities.sas.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everytime I run this program, I need to edit the properties of TBDET_MMDDYYYY under File Location Tab by renaming TBDET_MMDDYYYY.txt under File name.&lt;/P&gt;&lt;P&gt;For example, if the latest .txt file is TBDET_04222014.txt I need to rename the file name from&lt;STRONG&gt; E:\Personal\RAW\TBDET_04212014.txt&lt;/STRONG&gt; to &lt;STRONG&gt;E:\Personal\RAW\TBDET_04222014.txt.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way in SAS DI wherein I don't need to update the file name anymore everytime there is a new data? Creating a macro perhaps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 09:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-DI-Data-Integration-Creation-of-Macro/m-p/188511#M35632</guid>
      <dc:creator>01SASUser</dc:creator>
      <dc:date>2014-04-22T09:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI (Data Integration): Creation of Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-DI-Data-Integration-Creation-of-Macro/m-p/188512#M35633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said the magic word - macro (as in macro variable). Be sure to e select "Double quotes around file name" in the File Location tabs. How to set the macro variable to a proper value depends on you application.&lt;/P&gt;&lt;P&gt;If you wish to import multiple files in one go you might want to take a look at the loop transform (where you feed the file name from an outer job to the existing job).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 10:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-DI-Data-Integration-Creation-of-Macro/m-p/188512#M35633</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-04-22T10:47:54Z</dc:date>
    </item>
  </channel>
</rss>

