<?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: Renaming datasets during code execution only in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765752#M242566</link>
    <description>&lt;P&gt;I think the safest would be to create views of those data sets, unless you are looking for an "automagic" process to guess which files need the exception to handling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data abc_201801/ view=abc_201801;
   set EFG_201801;
run;&lt;/PRE&gt;
&lt;P&gt;As an example. When you use the set Abc_201801 it pulls the data from the EFG named set.&lt;/P&gt;
&lt;P&gt;Performance issue is that every use of the Abc version will read EFG version.&lt;/P&gt;
&lt;P&gt;The view is just the instructions to get the data. If the EFG file is deleted or renamed the view won't work.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Sep 2021 21:33:02 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-09-02T21:33:02Z</dc:date>
    <item>
      <title>Renaming datasets during code execution only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765743#M242565</link>
      <description>&lt;P&gt;Hello, I am running a code that access a series of datasets in read-only mode to be used later in several computations.&lt;/P&gt;&lt;P&gt;The datasets are named like&amp;nbsp; ABC_yyyymm:&lt;/P&gt;&lt;P&gt;ABC_201501&lt;/P&gt;&lt;P&gt;ABC_201502&lt;/P&gt;&lt;P&gt;ABC_201601&lt;/P&gt;&lt;P&gt;ABC_201602&lt;/P&gt;&lt;P&gt;ABC_201701&lt;/P&gt;&lt;P&gt;ABC_201702&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However some sets have their original name as EFY_yyyymm, e.g. EFG_201801,&amp;nbsp;EFG_201802&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I temporarily assign the names&amp;nbsp;ABC_201801 to&amp;nbsp;EFG_201801, and ABC_2018_02 to&amp;nbsp;EFG_201802 so that the files data can be used during the code execution?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-I am using SAS v7.13 HF5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 21:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765743#M242565</guid>
      <dc:creator>maryami</dc:creator>
      <dc:date>2021-09-02T21:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming datasets during code execution only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765752#M242566</link>
      <description>&lt;P&gt;I think the safest would be to create views of those data sets, unless you are looking for an "automagic" process to guess which files need the exception to handling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data abc_201801/ view=abc_201801;
   set EFG_201801;
run;&lt;/PRE&gt;
&lt;P&gt;As an example. When you use the set Abc_201801 it pulls the data from the EFG named set.&lt;/P&gt;
&lt;P&gt;Performance issue is that every use of the Abc version will read EFG version.&lt;/P&gt;
&lt;P&gt;The view is just the instructions to get the data. If the EFG file is deleted or renamed the view won't work.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 21:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765752#M242566</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-02T21:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming datasets during code execution only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765792#M242587</link>
      <description>&lt;P&gt;How complex is the code?&lt;BR /&gt;Why not modify the code to store the prefix of the dataset name in a macro variable.&amp;nbsp; Then you just need to change the macro variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let prefix=ABC;
*** Rest of code ***;
data x;
 set &amp;amp;prefix._201501;
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PS There is no way you are running SAS 7.13.&amp;nbsp; There was not SAS 7.13 there was barely ever a SAS 7 as the real usable version of SAS went straight from 6.12 to 8.1.&amp;nbsp; You have probably posted the version of Enterprise Guide or some other tool you are using to help you send code to SAS to run.&amp;nbsp; To see what version of SAS you are running check the top of the FULL SAS log.&amp;nbsp; Or check the automatic macro variable SYSVLONG.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 03:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765792#M242587</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-03T03:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming datasets during code execution only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765842#M242616</link>
      <description>&lt;P&gt;Perhaps&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396033"&gt;@maryami&lt;/a&gt;&amp;nbsp;meant SAS EG 7.13 with Hot fix HF5&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 12:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765842#M242616</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-09-03T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming datasets during code execution only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765860#M242621</link>
      <description>&lt;P&gt;Indeed I was referring to EG, i.e. SAS EG 7.13 HF5, thanks&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 13:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-datasets-during-code-execution-only/m-p/765860#M242621</guid>
      <dc:creator>maryami</dc:creator>
      <dc:date>2021-09-03T13:26:21Z</dc:date>
    </item>
  </channel>
</rss>

