<?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: Difference in dataset size after updating the metadata in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/494505#M130325</link>
    <description>Thank you so much.</description>
    <pubDate>Tue, 11 Sep 2018 15:00:49 GMT</pubDate>
    <dc:creator>Jagadeesh2907</dc:creator>
    <dc:date>2018-09-11T15:00:49Z</dc:date>
    <item>
      <title>Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308682#M66270</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a 121 GB Dataset in which i had to change the length of a variable from char(20) to char(50). I used the below code to do this and found that the resulting dataset was only 23 GB. However when i did the proc contents i saw both records had the same number of observation and the only difference in the output of proc contents was that in the dataset before updating "Deleted Observation" value was 69956558 and after updating "Deleted Observation" value was 0. Could you please let me know what difference does this make and is this the reason for size change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code for updating variable size:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;alter table mart.s2_pseudo_qrt_table&lt;BR /&gt;modify PRODUCT_LINE_ID char(50) ;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 06:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308682#M66270</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2016-11-02T06:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308683#M66271</link>
      <description>&lt;P&gt;It looks like your dataset originally contained nearly 70M observations that were marked for deletion but still taking up space. When you did your ALTER TABLE the entire dataset was processed, removing the observations marked for deletion and the space they were taking up. This explains the drop in dataset size.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 06:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308683#M66271</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-11-02T06:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308697#M66278</link>
      <description>Hi , Thank you for the explanation. This gives a fair idea. However, when you say records were marked for deletion but were not actually deleted ?</description>
      <pubDate>Wed, 02 Nov 2016 07:42:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308697#M66278</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2016-11-02T07:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308699#M66279</link>
      <description>&lt;P&gt;This can be achieved by (eg) a data step with &lt;FONT face="courier new,courier"&gt;modify&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;remove&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 08:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308699#M66279</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-02T08:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308951#M66384</link>
      <description>&lt;P&gt;Can you please give an example of the same.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 08:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308951#M66384</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2016-11-03T08:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308952#M66385</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107894"&gt;@Jagadeesh2907&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Can you please give an example of the same.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this very simple example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;
run;

data class;
modify class;
if age = 15 then remove;
run;

proc contents data=class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Partial result:&lt;/P&gt;
&lt;PRE&gt;                                    The CONTENTS Procedure

Data Set Name        WORK.CLASS                                       Observations          15
Member Type          DATA                                             Variables             5 
Engine               V9                                               Indexes               0 
Created              Do, 03. Nov 2016 09.24 Uhr                       Observation Length    40
Last Modified        Do, 03. Nov 2016 09.24 Uhr                       Deleted Observations  4 
Protection                                                            Compressed            NO
Data Set Type                                                         Sorted                NO
Label                                                                                         
&lt;/PRE&gt;
&lt;P&gt;You can see that the original 19 obs of sashelp.class have been reduced to 15, but you also see 4 deleted observations that are still physically in there and consume space.&lt;/P&gt;
&lt;P&gt;Now let's run a "simple" data step over that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set class;
run;

proc contents data=class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;New result:&lt;/P&gt;
&lt;PRE&gt;                                     The CONTENTS Procedure

 Data Set Name        WORK.CLASS                                       Observations          15
 Member Type          DATA                                             Variables             5 
 Engine               V9                                               Indexes               0 
 Created              Do, 03. Nov 2016 09.32 Uhr                       Observation Length    40
 Last Modified        Do, 03. Nov 2016 09.32 Uhr                       Deleted Observations  0 
 Protection                                                            Compressed            NO
 Data Set Type                                                         Sorted                NO
&lt;/PRE&gt;
&lt;P&gt;Now those 4 deleted observations have vanished, and SAS can reduce the physical size of the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, given the small size of SASHELP.CLASS, this will not be visible on the OS level, as only 1 dataset page is needed anyway. But you get the picture.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 08:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/308952#M66385</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-03T08:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in dataset size after updating the metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/494505#M130325</link>
      <description>Thank you so much.</description>
      <pubDate>Tue, 11 Sep 2018 15:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-in-dataset-size-after-updating-the-metadata/m-p/494505#M130325</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2018-09-11T15:00:49Z</dc:date>
    </item>
  </channel>
</rss>

