<?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: How to reuse ods package name to zip files? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-ods-package-name-to-zip-files/m-p/790422#M253072</link>
    <description>&lt;P&gt;Do you mean something like this? I find it works as expected, creating two zip files (xyz.zip and then xyz2.zip).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename x1 "c:\temp\myfile.txt";
ods package(newzip) open nopf;
ods package(newzip) add file=x1 path="data/";
ods package(newzip) publish archive 
  properties(
   archive_name="xyz.zip" 
   archive_path="c:\temp"
  );
ods package(newzip) close;

filename x1 "c:\temp\myfile.txt";
ods package(newzip) open nopf;
ods package(newzip) add file=x1 path="data/";
ods package(newzip) publish archive 
  properties(
   archive_name="xyz2.zip" 
   archive_path="c:\temp"
  );
ods package(newzip) close;&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 16 Jan 2022 18:44:53 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2022-01-16T18:44:53Z</dc:date>
    <item>
      <title>How to reuse ods package name to zip files?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-ods-package-name-to-zip-files/m-p/790420#M253071</link>
      <description>&lt;P&gt;Hi, I am using ods package to zip files in sas studio. From official website, I learned that name in the bracket is name aligned to ods package. But it seems this ods package name could be different from the final zip file name(here suppose it is 'newzip'). I need to create several zip files in the same prgramme, but when I reuse the ods package name, an error that this thread has been occupied happens. But after I relaunch sas studio, this pachage name could be used again, but still for once. Any solution? Or I have no way but to change the ods package name in the same pragramme every time when I want to create a new zip file? Thx.&lt;/P&gt;&lt;PRE&gt;ods package(newzip) open nopf;
ods package(newzip) add file=x1 path="data/";
ods package(newzip) add file=x2;
ods package(newzip) publish archive 
  properties(
   archive_name="xyz.zip" 
   archive_path="directory_name_here"
  );
ods package(newzip) close;&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 Jan 2022 17:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-ods-package-name-to-zip-files/m-p/790420#M253071</guid>
      <dc:creator>ClayZhai</dc:creator>
      <dc:date>2022-01-16T17:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to reuse ods package name to zip files?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-ods-package-name-to-zip-files/m-p/790422#M253072</link>
      <description>&lt;P&gt;Do you mean something like this? I find it works as expected, creating two zip files (xyz.zip and then xyz2.zip).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename x1 "c:\temp\myfile.txt";
ods package(newzip) open nopf;
ods package(newzip) add file=x1 path="data/";
ods package(newzip) publish archive 
  properties(
   archive_name="xyz.zip" 
   archive_path="c:\temp"
  );
ods package(newzip) close;

filename x1 "c:\temp\myfile.txt";
ods package(newzip) open nopf;
ods package(newzip) add file=x1 path="data/";
ods package(newzip) publish archive 
  properties(
   archive_name="xyz2.zip" 
   archive_path="c:\temp"
  );
ods package(newzip) close;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 Jan 2022 18:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-ods-package-name-to-zip-files/m-p/790422#M253072</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-01-16T18:44:53Z</dc:date>
    </item>
  </channel>
</rss>

