<?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: Proc Dataset Compress without changing Metadata Values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805155#M317127</link>
    <description>Yes, they're compressed. You need to include the Options statement before and after the Proc Datasets block of code. My hope was that there was an option to keep the original owner/creator value as the DateCopy option does for the date metadata values.</description>
    <pubDate>Wed, 30 Mar 2022 21:35:38 GMT</pubDate>
    <dc:creator>rileyd</dc:creator>
    <dc:date>2022-03-30T21:35:38Z</dc:date>
    <item>
      <title>Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805142#M317117</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a process that identifies datasets that can be compressed to safe storage space. I would like to loop through these datasets and compress them but I want to keep the owner and date fields unchanged.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially, my current code moves the dataset from its current location to work then back to its original location. I'm able to keep the original date values but this approach results in the owner value switching to me. My goal is to keep all the original metadata just compress the dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is an example of my code:&lt;/P&gt;
&lt;P&gt;Options Compress = Yes;&lt;/P&gt;
&lt;P&gt;Libname Cleanup '/cidata/pmgshr/lob_gl/202106/SAS_Ref';&lt;/P&gt;
&lt;P&gt;Proc Datasets Library = Cleanup NoList; &lt;BR /&gt;Copy In = Cleanup Out = Work NoClone DateCopy Move;&lt;BR /&gt;Select LOSS_DEV_SMOOTH&lt;BR /&gt;PREM_DEV&lt;BR /&gt;PREM_WLDD&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;BR /&gt;Copy In = Work Out = Cleanup NoClone DateCopy Move;&lt;BR /&gt;Select LOSS_DEV_SMOOTH&lt;BR /&gt;PREM_DEV&lt;BR /&gt;PREM_WLDD&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;BR /&gt;Quit;&lt;/P&gt;
&lt;P&gt;Libname Cleanup Clear;&lt;/P&gt;
&lt;P&gt;Options Compress = No;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the help!&lt;/P&gt;
&lt;P&gt;-rileyd&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805142#M317117</guid>
      <dc:creator>rileyd</dc:creator>
      <dc:date>2022-03-30T20:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805144#M317119</link>
      <description>&lt;P&gt;Not possible. To compress SAS datasets they have to be rewritten in their entirety, row by row as in a DATA step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Compressed (compress = yes);
  set Not_Compressed;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805144#M317119</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-03-30T20:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805146#M317120</link>
      <description>&lt;P&gt;I don't think that's the case. My current code works just fine with the exception of the value of the original owner/creator of the dataset changing.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805146#M317120</guid>
      <dc:creator>rileyd</dc:creator>
      <dc:date>2022-03-30T20:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805150#M317124</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37501"&gt;@rileyd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I don't think that's the case. My current code works just fine with the exception of the value of the original owner/creator of the dataset changing.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;states the SAS files get re-created. The owner of the new file is the owner of the process that creates the files (which is you or a functional user if run under a scheduler).&lt;/P&gt;
&lt;P&gt;Creating/changing the owner of a file requires elevated rights which you highly likely won't have and won't get. IF you'd have such elevated rights then the owner could get changed with Unix OS commands after the new file has been created.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805150#M317124</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-03-30T21:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805152#M317125</link>
      <description>&lt;P&gt;Your code will work but have you checked if your datasets are compressed or not? When I tested PROC DATASETS COPY it didn't compress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Using NOCLONE ensures the target dataset is compressed. Don't think there is any way to prevent metadata being updated.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805152#M317125</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-03-30T21:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805155#M317127</link>
      <description>Yes, they're compressed. You need to include the Options statement before and after the Proc Datasets block of code. My hope was that there was an option to keep the original owner/creator value as the DateCopy option does for the date metadata values.</description>
      <pubDate>Wed, 30 Mar 2022 21:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805155#M317127</guid>
      <dc:creator>rileyd</dc:creator>
      <dc:date>2022-03-30T21:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Dataset Compress without changing Metadata Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805156#M317128</link>
      <description>&lt;P&gt;Agree. Just found NOCLONE is required too to go from uncompressed to compressed. Don't know any way to avoid the metadata update.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Dataset-Compress-without-changing-Metadata-Values/m-p/805156#M317128</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-03-30T21:41:59Z</dc:date>
    </item>
  </channel>
</rss>

