<?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 Can we use proc datasets change to rename multiple datasets in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-use-proc-datasets-change-to-rename-multiple-datasets/m-p/938562#M45118</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname src1 spde "/...prod/2023/05/Ep";

proc datasets lib=src1;

/* Changing the name of the dataset */
change
ep_agi_202312=ep_agi_202305 ep_ax_202312=ep_ax_202305 ep_be_202312=ep_be_202305 ep_gc_202312=ep_gc_202305 ep_gcna_202312=ep_gcna_202305 ep_ha_202312=ep_ha_202305 ep_je_202312=ep_je_202305 ep_nx_202312=ep_nx_202305
 ep_tot_202312_ibnrengine=ep_tot_202305_ibnrengine ep_tr_202312=ep_tr_202305 ep_wc_202312=ep_wc_202305 ep_wu_202312=ep_wu_202305 rsa_hist_prem_202312_cum=rsa_hist_prem_202305_cum rsa_prm_202312=rsa_prm_202305
 rsa_prm_202312_tna_v1=rsa_prm_202305_tna_v1 rsa_prm_202312_tna_v1_currentyr=rsa_prm_202305_tna_v1_currentyr rsa_prm_202312_tna_v1_cyr_sum=rsa_prm_202305_tna_v1_cyr_sum rsa_prm_202312_tna_v3_old_accyr=rsa_prm_202305_tna_v3_old_accyr
 rsa_prm_202312_tna_v3_old_yr=rsa_prm_202305_tna_v3_old_yr tot_ep_202312_v1=tot_ep_202305_v1
;
quit; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ERROR: The file SRC1.RSA_PRM_202312 (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;ERROR: The file SRC1.RSA_PRM_202312_TNA_V3_OLD_ACCYR (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;ERROR: The file SRC1.RSA_PRM_202312_TNA_V3_OLD_YR (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;NOTE: Statements not processed because of errors noted above.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: Due to ERROR(s) above, SAS set option OBS=0, enabling syntax check mode. &lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 16:07:02 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2024-08-07T16:07:02Z</dc:date>
    <item>
      <title>Can we use proc datasets change to rename multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-use-proc-datasets-change-to-rename-multiple-datasets/m-p/938562#M45118</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname src1 spde "/...prod/2023/05/Ep";

proc datasets lib=src1;

/* Changing the name of the dataset */
change
ep_agi_202312=ep_agi_202305 ep_ax_202312=ep_ax_202305 ep_be_202312=ep_be_202305 ep_gc_202312=ep_gc_202305 ep_gcna_202312=ep_gcna_202305 ep_ha_202312=ep_ha_202305 ep_je_202312=ep_je_202305 ep_nx_202312=ep_nx_202305
 ep_tot_202312_ibnrengine=ep_tot_202305_ibnrengine ep_tr_202312=ep_tr_202305 ep_wc_202312=ep_wc_202305 ep_wu_202312=ep_wu_202305 rsa_hist_prem_202312_cum=rsa_hist_prem_202305_cum rsa_prm_202312=rsa_prm_202305
 rsa_prm_202312_tna_v1=rsa_prm_202305_tna_v1 rsa_prm_202312_tna_v1_currentyr=rsa_prm_202305_tna_v1_currentyr rsa_prm_202312_tna_v1_cyr_sum=rsa_prm_202305_tna_v1_cyr_sum rsa_prm_202312_tna_v3_old_accyr=rsa_prm_202305_tna_v3_old_accyr
 rsa_prm_202312_tna_v3_old_yr=rsa_prm_202305_tna_v3_old_yr tot_ep_202312_v1=tot_ep_202305_v1
;
quit; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ERROR: The file SRC1.RSA_PRM_202312 (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;ERROR: The file SRC1.RSA_PRM_202312_TNA_V3_OLD_ACCYR (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;ERROR: The file SRC1.RSA_PRM_202312_TNA_V3_OLD_YR (memtype=ALL) was not found, but appears on a CHANGE statement.&lt;BR /&gt;NOTE: Statements not processed because of errors noted above.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: Due to ERROR(s) above, SAS set option OBS=0, enabling syntax check mode. &lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 16:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-use-proc-datasets-change-to-rename-multiple-datasets/m-p/938562#M45118</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-08-07T16:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use proc datasets change to rename multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-use-proc-datasets-change-to-rename-multiple-datasets/m-p/938567#M45119</link>
      <description>&lt;P&gt;The answer to the question is yes but there are caveats.&lt;/P&gt;
&lt;P&gt;External databases probably will not allow SAS to rename tables because then users of that database would no longer have the tables they need the native database scripts/programs to run. Or the database admins have not given you the permissions needed to rename / delete or other modifications of existing tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general if the data set (or view or catalog ) does not exist then you can't rename it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An example that you should be able to run that creates 3 data sets in your WORK library where you should have all permissions needed and then renames them to demonstrate that it is possible.&lt;/P&gt;
&lt;PRE&gt;proc sort data=sashelp.class
          out=work.agesort;
  by age;
run;

proc sort data=sashelp.class
          out=work.sexsort;
  by sex;
run;

proc sort data=sashelp.class
          out=work.heightsort;
  by height;
run;

proc datasets library=work;
   change agesort=sortage sexsort=sortsex heightsort=sortheight;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 16:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-use-proc-datasets-change-to-rename-multiple-datasets/m-p/938567#M45119</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-07T16:26:58Z</dc:date>
    </item>
  </channel>
</rss>

