<?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 Zip question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Zip-question/m-p/142526#M37915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have been having a few problems with my code and while I finally corrected one problem, it seems to have created another one. Background: my coworker is out on leave, and I have inherited some of his code. The original problem was: when my coworker ran a job in his crontab or when I ran it manually, it worked fine when the zip command just had the filename. But when I run it through MY crontab, after it created an excel file it would fail when trying to email the zip because no zip was created. Once I changed the code to have the full path and not just the filename it is emailing the zip successfully, but&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; it causes my zip file to be full of folders of the full path. I.E. path is /proj/team/MIS/Daily/job1 and when I get the email and open the zip file it opens a proj folder, inside that is a team folder, inside that is a MIS folder...etc until it finally gets to the xls. I just want the xls to be in the zip, no folders. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Here is the code I am using to create the zip.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; CALL SYMPUT("sysdate2",PUT(TODAY(),YYMMDDn8.));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; CALL SYSTEM("/usr/bin/zip -9 /proj/team/MIS/Daily/job1/job1_&amp;amp;sysdate2 /proj/team/MIS/Daily/job1/job1_&amp;amp;sysdate2..xls");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; X=SLEEP(5,1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Does anyone know how I can fix this? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2013 23:54:52 GMT</pubDate>
    <dc:creator>sakuraiiko</dc:creator>
    <dc:date>2013-11-13T23:54:52Z</dc:date>
    <item>
      <title>Zip question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Zip-question/m-p/142526#M37915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have been having a few problems with my code and while I finally corrected one problem, it seems to have created another one. Background: my coworker is out on leave, and I have inherited some of his code. The original problem was: when my coworker ran a job in his crontab or when I ran it manually, it worked fine when the zip command just had the filename. But when I run it through MY crontab, after it created an excel file it would fail when trying to email the zip because no zip was created. Once I changed the code to have the full path and not just the filename it is emailing the zip successfully, but&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; it causes my zip file to be full of folders of the full path. I.E. path is /proj/team/MIS/Daily/job1 and when I get the email and open the zip file it opens a proj folder, inside that is a team folder, inside that is a MIS folder...etc until it finally gets to the xls. I just want the xls to be in the zip, no folders. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Here is the code I am using to create the zip.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; CALL SYMPUT("sysdate2",PUT(TODAY(),YYMMDDn8.));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; CALL SYSTEM("/usr/bin/zip -9 /proj/team/MIS/Daily/job1/job1_&amp;amp;sysdate2 /proj/team/MIS/Daily/job1/job1_&amp;amp;sysdate2..xls");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; X=SLEEP(5,1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Does anyone know how I can fix this? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 23:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Zip-question/m-p/142526#M37915</guid>
      <dc:creator>sakuraiiko</dc:creator>
      <dc:date>2013-11-13T23:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Zip question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Zip-question/m-p/142527#M37916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is just about adding a switch to your zip command so that the folder structure doesn't get included. You will need to consult the man pages for your zip implementation to determine the correct syntax (it could be -j: "/usr/bin/zip -9 &lt;STRONG&gt;-j&lt;/STRONG&gt; /proj/team......)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 00:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Zip-question/m-p/142527#M37916</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-11-14T00:47:31Z</dc:date>
    </item>
  </channel>
</rss>

