<?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: dnum() returns zero for a non-empty folder in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364356#M86417</link>
    <description>&lt;P&gt;The moral of the story is that the SASZIPAM engine is intended by SAS only for use in the install process. Any other use is not supported and likely not to have any fix and likely not to be an easy one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use of undocumented procedures or features is contra-indicated for critical operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you say this is the "largest" from "the same source" it may be that they had used Winzip for the other files but not for this set because of size. Or they changed options to allow it to handle the size. Or the original file system was different for this file and could not use WinZip. Or the longest Path descriptor doesn't work correctly for some reason.&amp;nbsp;Or this is only the first file with followups to be in the same format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest contacting the source and having them describe what was different in preparing this file and check if Winzip could be used.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2017 19:56:33 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-06-05T19:56:33Z</dc:date>
    <item>
      <title>dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363902#M86228</link>
      <description>&lt;P&gt;I'm reading members of zip files. One contains many files but dnum() returns zero. How can I get it to give the correct count? And loop through the members.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ZIPFILE SASZIPAM &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;in_dir.&amp;amp;fn"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; comboxml &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;in_dir.&amp;amp;fn2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; contents(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=memname) documents;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;fid=dopen(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"ZIPFILE"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;file&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;print&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;fn"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; fid=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; fid=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;stop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;memcount=dnum(fid);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"memcount="&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; memcount;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; memcount;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;memname=dread(fid,i);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; contents;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; index(memname,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'.xml'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &amp;gt; index(memname,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'/'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"XML member"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i= memname=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;rc=dclose(fid);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 18:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363902#M86228</guid>
      <dc:creator>Ame4s</dc:creator>
      <dc:date>2017-06-02T18:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363909#M86232</link>
      <description>&lt;P&gt;It is the largest zip file and has over 70,000 files.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 19:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363909#M86232</guid>
      <dc:creator>Ame4s</dc:creator>
      <dc:date>2017-06-02T19:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363959#M86251</link>
      <description>&lt;P&gt;I don't think I would expect the single file of ZIP format to contain the actual directory or file&amp;nbsp;markers for the operating system that the external file functions such as DOPEN and FOPEN would expect to find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have enough space to extract the files from the ZIP? Or use another tool to search for the file names you want.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 23:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363959#M86251</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-02T23:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363970#M86254</link>
      <description>&lt;P&gt;Using filename with SASZIPAM worked with other zip files to read the contents. One of them had over 50,000 files. (Many of the files are tiny.) It's just this one that doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get VBA to read the file members but SAS won't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It'd be much preferable to get the current tool to work than to set up something else for one file. At some point I'll have to do it if no solution is available.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 23:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/363970#M86254</guid>
      <dc:creator>Ame4s</dc:creator>
      <dc:date>2017-06-02T23:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364315#M86397</link>
      <description>&lt;P&gt;Were both Zip files created with the same software and options?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From online documents:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SASZIPAM is a tool used internally for the SAS install process. It is not supported for customer use outside the install process. While it is mentioned on non-SAS information sources and some customers have been using it on the FILENAME statement, support is not available from SAS Technical Support.&lt;/P&gt;
&lt;P&gt;No documentation is available.&lt;/P&gt;
&lt;P&gt;If you experience difficulties, try one or more of these options:&lt;/P&gt;
&lt;PRE&gt;     1.  Do not try to read an archive file containing more 
         than one file.
     2.  Read an archive file created only by WinZip. &lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;ZIP 
         files created by other tools may produce an I/O error.
&lt;/STRONG&gt;&lt;/FONT&gt;     3.  Add LRECL=32767 to the FILENAME statement.
     4.  Contact the source of your information on SASZIPAM.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 17:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364315#M86397</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-05T17:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364320#M86398</link>
      <description>&lt;P&gt;Hello ballardw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have specific knowledge of the creation. Both files came from the same source, along with several dozen other files successfully read with the same method. The one that fails is simply the largest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 17:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364320#M86398</guid>
      <dc:creator>Ame4s</dc:creator>
      <dc:date>2017-06-05T17:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364356#M86417</link>
      <description>&lt;P&gt;The moral of the story is that the SASZIPAM engine is intended by SAS only for use in the install process. Any other use is not supported and likely not to have any fix and likely not to be an easy one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use of undocumented procedures or features is contra-indicated for critical operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you say this is the "largest" from "the same source" it may be that they had used Winzip for the other files but not for this set because of size. Or they changed options to allow it to handle the size. Or the original file system was different for this file and could not use WinZip. Or the longest Path descriptor doesn't work correctly for some reason.&amp;nbsp;Or this is only the first file with followups to be in the same format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest contacting the source and having them describe what was different in preparing this file and check if Winzip could be used.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 19:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364356#M86417</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-05T19:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: dnum() returns zero for a non-empty folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364362#M86420</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up extracting the files to read them since contacting the source has yet to be timely.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 20:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dnum-returns-zero-for-a-non-empty-folder/m-p/364362#M86420</guid>
      <dc:creator>Ame4s</dc:creator>
      <dc:date>2017-06-05T20:17:22Z</dc:date>
    </item>
  </channel>
</rss>

