<?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: Creating a zip file on sas OD for academics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759747#M240154</link>
    <description>&lt;P&gt;Tank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Shame of me - so simple solution. My eyes mislead me.&lt;/P&gt;
&lt;P&gt;I need just to add&amp;nbsp; the path to file to be zipped.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 16:01:41 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2021-08-05T16:01:41Z</dc:date>
    <item>
      <title>Creating a zip file on sas OD for academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759684#M240125</link>
      <description>&lt;P&gt;When I ran a dummy test step (3 files only) &lt;STRONG&gt;it worked fine&lt;/STRONG&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let zip_ref = testzip;
filename &amp;amp;zip_ref "~/reports/&amp;amp;zip_name";
ods package(&amp;amp;zip_ref) open nopf;
ods package(&amp;amp;zip_ref) add file='~/reports/BID123.html';
ods package(&amp;amp;zip_ref) add file='~/reports/BID124.html';
ods package(&amp;amp;zip_ref) add file='~/reports/BID125.html';

ods package(&amp;amp;zip_ref) publish archive 
  properties(
   archive_name="test_zip.zip" 
   archive_path="~/reports/"
  );
ods package(&amp;amp;zip_ref) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then I generated a program to zip more html files (26 instead 3 and I would like to zip much more).&lt;/P&gt;
&lt;P&gt;when I ty to run the generated program I get an error, I do not understand &lt;STRONG&gt;why and how to fix it&lt;/STRONG&gt;. All files exist in the same input folder.&lt;/P&gt;
&lt;P&gt;the generated program is:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename zipped "~/reports/html_ziped.zip";
ods package(zipped) open nopf;
ods package(zipped) add file='BID64.html';
ods package(zipped) add file='BID129.html';
ods package(zipped) add file='B_menu.html';
ods package(zipped) add file='M_menu.html';
ods package(zipped) add file='BID123.html';
ods package(zipped) add file='BID68.html';
ods package(zipped) add file='BID65.html';
ods package(zipped) add file='P_menu.html';
ods package(zipped) add file='BID67.html';
ods package(zipped) add file='iNat_main_v3.html';
ods package(zipped) add file='BID155.html';
ods package(zipped) add file='BID125.html';
ods package(zipped) add file='A_menu.html';
ods package(zipped) add file='BID63.html';
ods package(zipped) add file='BID47.html';
ods package(zipped) add file='BID124.html';
ods package(zipped) add file='BID128.html';
ods package(zipped) add file='F_menu.html';
ods package(zipped) add file='BID172.html';
ods package(zipped) add file='BID126.html';
ods package(zipped) add file='BID71.html';
ods package(zipped) add file='BID131.html';
ods package(zipped) add file='BID66.html';
ods package(zipped) add file='R_menu.html';
ods package(zipped) add file='BID72.html';
ods package(zipped) add file='BID130.html';
ods package(zipped) publish archive properties(archive_name="html_ziped.zip" archive_path="~/reports/");
ods package(zipped) close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Next is the log, where&amp;nbsp;"pgm" is the fileref to the generated program shown above.&lt;/P&gt;
&lt;PRE&gt;120        %include pgm;
 NOTE: Writing ZIPPED file: ~/reports/html_ziped.zip
 ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/BID64.html.&lt;/PRE&gt;
&lt;P&gt;When I drag the generated program to the program editor and submit I get the same error message.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I submit it, as a second try, I get messages that the zip file is locked.&lt;/P&gt;
&lt;P&gt;Next is the end of the 2nd run log:&lt;/P&gt;
&lt;PRE&gt; 96         ods package(zipped) add file='BID72.html';
 97         ods package(zipped) add file='BID130.html';
 ERROR: Resource is write-locked by another thread.  File =/home/sabinun/reports/html_ziped.zip.
 ERROR: Resource is write-locked by another thread.  File =/home/sabinun/reports/html_ziped.zip.
 98         ods package(zipped) publish archive properties(archive_name="html_ziped.zip" archive_path="~/reports/");
 ERROR: File is in use, /home/sabinun/reports/html_ziped.zip.
 99         ods package(zipped) close;
 100        
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 13:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759684#M240125</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-08-05T13:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a zip file on sas OD for academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759729#M240145</link>
      <description>Your file is specified differently in between the two sets of code, so I'm guessing the files don't exist in the path specified in the second set of code.&lt;BR /&gt;&lt;BR /&gt;ods package(&amp;amp;zip_ref) add file='~/reports/BID125.html';&lt;BR /&gt;VS&lt;BR /&gt;ods package(zipped) add file='BID125.html';</description>
      <pubDate>Thu, 05 Aug 2021 15:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759729#M240145</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-05T15:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a zip file on sas OD for academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759730#M240146</link>
      <description>&lt;P&gt;The first message is probably related to all the others.&lt;/P&gt;
&lt;PRE&gt;ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/BID64.html.&lt;/PRE&gt;
&lt;P&gt;Is the path in that message where you intended to write the output? Likely not I think as there is no "Reports" in the file path. The Paths to all the files needs to start at a root for your access otherwise SAS thinks that the target or source file is in the current working directory, which you likely do not have actual access to write any files to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you seem to be using the same zip file, the one that doesn't exist, that is locked by the error process as it has not been released.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 15:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759730#M240146</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-05T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a zip file on sas OD for academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759747#M240154</link>
      <description>&lt;P&gt;Tank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Shame of me - so simple solution. My eyes mislead me.&lt;/P&gt;
&lt;P&gt;I need just to add&amp;nbsp; the path to file to be zipped.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 16:01:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/759747#M240154</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-08-05T16:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a zip file on sas OD for academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/760179#M240352</link>
      <description>for reference, there's a macro here that might be helpful:  &lt;A href="https://core.sasjs.io/mp__zip_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__zip_8sas.html&lt;/A&gt;</description>
      <pubDate>Sat, 07 Aug 2021 18:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-zip-file-on-sas-OD-for-academics/m-p/760179#M240352</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-08-07T18:41:27Z</dc:date>
    </item>
  </channel>
</rss>

