<?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: Using WinZip command line from inside SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122380#M25102</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Tom wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Your filename has embedded spaces.&amp;nbsp; Try quoting it.&amp;nbsp; (or have the macro do it)&amp;nbsp; The QUOTE function is good for this.&lt;/P&gt;
&lt;P&gt;Another issue I have had with other programs is that environment variables are different when run from command shell than when running from within SAS.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;My file name does not have space(s) in it, and quoting or not doesn't seem to make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand the comment and environment variables, how could I find the environment variables used in the command shell?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2012 11:49:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2012-05-22T11:49:42Z</dc:date>
    <item>
      <title>Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122377#M25099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this paper, "&lt;A href="http://www.lexjansen.com/phuse/2006/cc/cc01.pdf"&gt;A Quick Guide to the WinZip® Command Line Add-On&lt;/A&gt;", I am trying to use the ideas to obtain a listing of the files inside a specific .zip file. I am running SAS 9.3 on Windows 7 Professional (64 bit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that paper, on page 6, is the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%wzzip(&lt;/P&gt;&lt;P&gt;zipfile = C:\WZ_Test\Zipped Text Files.zip&lt;/P&gt;&lt;P&gt;,options = -vb &amp;gt;"C:\WZ_Test\ZipInfo.txt"&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I replace the zipfile option with the location of my exact file; and I replace the options= with the location where I want the text file to be, and I run the SAS code. It doesn't work, and I get no error messages in the SASLOG or anywhere else. The desired output file doesn't show up. (Note: in Win 7 64 bit, the WZZIP.exe command is in the location C:\Program Files (x86) instead of C:\Program Files, but I have corrected the code for that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the SASlog, there is actual DOS code generated that can be copied and pasted into a DOS window. So, I try that, and the command works in DOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I conclude that there is something in SAS and/or Windows 7 that is preventing the code from executing properly inside SAS. But I have no idea what, or where to look. I welcome your suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 17:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122377#M25099</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-05-21T17:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122378#M25100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your filename has embedded spaces.&amp;nbsp; Try quoting it.&amp;nbsp; (or have the macro do it)&amp;nbsp; The QUOTE function is good for this.&lt;/P&gt;&lt;P&gt;Another issue I have had with other programs is that environment variables are different when run from command shell than when running from within SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 02:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122378#M25100</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-05-22T02:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122379#M25101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you use filename + pipe ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 05:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122379#M25101</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-22T05:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122380#M25102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Tom wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Your filename has embedded spaces.&amp;nbsp; Try quoting it.&amp;nbsp; (or have the macro do it)&amp;nbsp; The QUOTE function is good for this.&lt;/P&gt;
&lt;P&gt;Another issue I have had with other programs is that environment variables are different when run from command shell than when running from within SAS.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;My file name does not have space(s) in it, and quoting or not doesn't seem to make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand the comment and environment variables, how could I find the environment variables used in the command shell?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 11:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122380#M25102</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-05-22T11:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122381#M25103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure looks like a space between the d and the T and another between the t and the F.&lt;/P&gt;&lt;P&gt;From the command line you might need to enclose that filename in quotes to prevent the parse from thinking it was either multiple files or command parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wzzip -vb "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;C:\WZ_Test\Zipped Text Files.zip&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly the path the directory with the wzzip executable might have embedded spaces. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 03:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122381#M25103</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-05-23T03:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122382#M25104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the set command with no arguments to get a list of the environment variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One example that I had problems with environment variables was on a Unix system.&amp;nbsp; A program that I wanted to call from within SAS assumed that the environment variable TEMP pointed to a directory where it could store temporary files.&amp;nbsp; But the script that I was using to run SAS had already used that environment variable to point to a file instead of a directory.&amp;nbsp; So I had to include an unset TEMP command in the command string that I called from within SAS to get the program to run properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 03:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122382#M25104</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-05-23T03:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using WinZip command line from inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122383#M25105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, that's the example in the paper with the spaces. Trust me, there are no spaces in my files names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will check the environment variables as you suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 11:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-WinZip-command-line-from-inside-SAS/m-p/122383#M25105</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2012-05-23T11:44:50Z</dc:date>
    </item>
  </channel>
</rss>

