<?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: Delete a table from cas library in SAS Viya for Learners in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/761481#M20055</link>
    <description>Thanks for your answer! It works fine i used both replace and promote at the same time and everyting is fine,&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
    <pubDate>Fri, 13 Aug 2021 18:08:25 GMT</pubDate>
    <dc:creator>andreas_zaras</dc:creator>
    <dc:date>2021-08-13T18:08:25Z</dc:date>
    <item>
      <title>Delete a table from cas library in SAS Viya for Learners</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/756418#M20042</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a data set in the academic cas library in SAS Viya for learners using a data step (i also promoted it). I want to replace the data set with a new one. How can i delete it from the academic cas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 17:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/756418#M20042</guid>
      <dc:creator>andreas_zaras</dc:creator>
      <dc:date>2021-07-24T17:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a table from cas library in SAS Viya for Learners</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/756586#M20043</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3045"&gt;@andreas_zaras&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With regards to how to delete a table from a CAS library, I'd recommend you look at PROC CASUTIL, specifically the DROPTABLE function.&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/vdmmlcdc/1.0/casref/p14fpceaxx8pz9n1id0wrgj92mrt.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/vdmmlcdc/1.0/casref/p14fpceaxx8pz9n1id0wrgj92mrt.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When a table is promoted in CAS it is a global scope table, CAS does not allow you to implicitly replace the dataset to protect the dataset. That said, if you need to replace the data all you need to do is add the REPLACE option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some simple example code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Add CASLIB to session;
libname casuser cas;

*Load data into CAS;
data casuser.cars(promote=yes);
set sashelp.cars;
run;

*Replace data using datastep;
data casuser.cars(replace=yes);
set sashelp.cars(where=(make='Audi'));
run;

*Drop table using PROC CASUTIL;
proc casutil;
droptable casdata='cars' incaslib='casuser';
run;

*Test table does not exist;
proc print data=casuser.cars;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 08:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/756586#M20043</guid>
      <dc:creator>HarrySnart</dc:creator>
      <dc:date>2021-07-26T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a table from cas library in SAS Viya for Learners</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/761481#M20055</link>
      <description>Thanks for your answer! It works fine i used both replace and promote at the same time and everyting is fine,&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 13 Aug 2021 18:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/761481#M20055</guid>
      <dc:creator>andreas_zaras</dc:creator>
      <dc:date>2021-08-13T18:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a table from cas library in SAS Viya for Learners</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/830536#M20533</link>
      <description>&lt;P&gt;Unfortunately there seem&amp;nbsp; a misunderstanding in the given example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The proc print works fine en does not give an error at all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is because the second cars-table is a not a global-scope cas-table but a session-scope cas-table! The cas-table is therefore not replaced. The drop-table statement drops the session-scope table. The unalterd global-scope table still exists!!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 11:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-a-table-from-cas-library-in-SAS-Viya-for-Learners/m-p/830536#M20533</guid>
      <dc:creator>MAGG</dc:creator>
      <dc:date>2022-08-26T11:10:19Z</dc:date>
    </item>
  </channel>
</rss>

