<?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: Rename data set name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911111#M359278</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally, in my experience, when a file (of any description) is renamed, its location remains the same. If you want the library to change from &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; then that means the location has changed and so it sounds like you want to move the data set and not rename it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to &lt;STRONG&gt;&lt;EM&gt;move&lt;/EM&gt; &lt;/STRONG&gt;the data set from library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; or do you want to &lt;EM&gt;&lt;STRONG&gt;copy&lt;/STRONG&gt; &lt;/EM&gt;the data set from library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; so that the original is still in library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, &lt;EM&gt;&lt;STRONG&gt;move&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, or&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;copy&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, or &lt;EM&gt;&lt;STRONG&gt;something else&lt;/STRONG&gt;&lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 12:29:02 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2024-01-10T12:29:02Z</dc:date>
    <item>
      <title>Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911076#M359260</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Let's say that I want to rename data set WORK.tbl_A to WORK.tbl_B&lt;/P&gt;
&lt;PRE&gt;Data tbl_A;&lt;BR /&gt;Input ID Name$ Weight;&lt;BR /&gt;cards;&lt;BR /&gt;2 A 2&lt;BR /&gt;4 B 3&lt;BR /&gt;7 D 5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc datasets library=work;&lt;BR /&gt;change tbl_A=tbl_B;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;select *&lt;BR /&gt;from tbl_B&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;/PRE&gt;
&lt;P&gt;Let's say that I want to rename data set&amp;nbsp; R_R.tbl_A&amp;nbsp; &amp;nbsp; into WORK.tbl_A .&lt;/P&gt;
&lt;P&gt;What is the way to do it?&lt;/P&gt;
&lt;P&gt;When say "Rename data set" does it mean that there is a new data set name in same library?&lt;/P&gt;
&lt;P&gt;I know that in this case I can run following code but I ask if there is a better more quick way&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data WORK.tbl_A;
set R_R.tbl_A;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 08:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911076#M359260</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2024-01-10T08:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911084#M359265</link>
      <description>proc copy in=R_R out=WORK;&lt;BR /&gt;select tbl_A;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 10 Jan 2024 09:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911084#M359265</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-01-10T09:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911111#M359278</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally, in my experience, when a file (of any description) is renamed, its location remains the same. If you want the library to change from &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; then that means the location has changed and so it sounds like you want to move the data set and not rename it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to &lt;STRONG&gt;&lt;EM&gt;move&lt;/EM&gt; &lt;/STRONG&gt;the data set from library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; or do you want to &lt;EM&gt;&lt;STRONG&gt;copy&lt;/STRONG&gt; &lt;/EM&gt;the data set from library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;work&lt;/FONT&gt; so that the original is still in library &lt;FONT face="courier new,courier"&gt;R_R&lt;/FONT&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, &lt;EM&gt;&lt;STRONG&gt;move&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, or&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;copy&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, or &lt;EM&gt;&lt;STRONG&gt;something else&lt;/STRONG&gt;&lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 12:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911111#M359278</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2024-01-10T12:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911113#M359279</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options dlcreatedir;
libname rr "%sysfunc(pathname(work))\test";
data rr.tbl_a(index=(name/unique));
  set sashelp.class;
run;

proc datasets library=work nolist;
  copy
    in=rr
    out=work
    index=yes
    constraint=yes
    move
    ;
  select tbl_a;
  run;
  contents data=work.tbl_a;
  run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2024 12:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911113#M359279</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-01-10T12:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911176#M359306</link>
      <description>&lt;P&gt;IF you work on UNIX and&lt;/P&gt;
&lt;P&gt;IF your libraries are on the same physical device(*)&lt;/P&gt;
&lt;P&gt;then you can use the operating system's &lt;FONT face="courier new,courier"&gt;mv&lt;/FONT&gt; command, which only creates a new &lt;EM&gt;directory entry&lt;/EM&gt; and removes the old one, without touching the file itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*) this can be any kind of virtual disk, it only needs to be mounted as one device in the system's filesystem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In all other cases, you have to create a new &lt;EM&gt;file&lt;/EM&gt; and delete the old one, moving the whole mass of data.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 17:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911176#M359306</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-01-10T17:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rename data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911191#M359312</link>
      <description>&lt;P&gt;With all due respect, you need to describe correctly what you are doing first before looking for better solutions. As other posters have noted, you want to move or copy a dataset between libraries, not rename them (although you could do both). If you get your description right, then you'll have a much better chance of finding the better solution you want, by for example searching in &lt;A href="https://documentation.sas.com/doc/en/helpcenterwlcm/1.0/home.htm" target="_blank" rel="noopener"&gt;SAS documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-data-set-name/m-p/911191#M359312</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-01-10T20:39:15Z</dc:date>
    </item>
  </channel>
</rss>

