<?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: Learning Macros: ZIP file doesnt create any files. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639344#M21663</link>
    <description>This also worked as a solution! thank you!</description>
    <pubDate>Sun, 12 Apr 2020 18:05:33 GMT</pubDate>
    <dc:creator>romonysh</dc:creator>
    <dc:date>2020-04-12T18:05:33Z</dc:date>
    <item>
      <title>Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639097#M21652</link>
      <description>&lt;P&gt;Hello, I am learning to use SAS with SAS studio via a virtual machine on a mac. &amp;nbsp;I am learning how to use macros, and am trying to use a macro to unzip a file. The program ran with no problem, the shared folders were able to be accessed, yet the output didnt provide anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dm 'clear log';&lt;BR /&gt;Options nocenter nodate nonumber symbolgen;&lt;BR /&gt;%Let Path = /folders/myfolders/;&lt;BR /&gt;Libname mylib "&amp;amp;Path";&lt;BR /&gt;%macro readraw (first=, last=);&lt;BR /&gt;Filename ZIPFILE SASZIPAM "&amp;amp;Path/names.zip";&lt;BR /&gt;%do year=&amp;amp;first %to &amp;amp;last;&lt;BR /&gt;DATA mylib.DSN&amp;amp;Year;&lt;BR /&gt;INFILE ZIPFILE(yob&amp;amp;year..txt) DLM=",";&lt;BR /&gt;INPUT name $ gender $ number;&lt;BR /&gt;RUN;&lt;BR /&gt;title "Listing from Data Set (Newborns' Names) for &amp;amp;Year";&lt;BR /&gt;proc print data=mylib.DSN&amp;amp;Year(obs=5) noobs;&lt;BR /&gt;format number comma7.;&lt;BR /&gt;run;&lt;BR /&gt;%end ;&lt;BR /&gt;%mend readraw;&lt;BR /&gt;%readraw(first=2000, last=2005)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive attached the zip file and my log when I run it. I should be getting data sets for the years 2000-2005, instead I get empty data sets&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 23:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639097#M21652</guid>
      <dc:creator>romonysh</dc:creator>
      <dc:date>2020-04-10T23:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639098#M21653</link>
      <description>&lt;P&gt;Have you noticed the error message in log:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;ERROR: Member yob2000.txt does not exist.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check the name(s) in the zip file.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 23:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639098#M21653</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-10T23:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639104#M21655</link>
      <description>Yeah I noticed the error, but I checked and that named file is in the zip. So I am still confused. Thank you for looking!</description>
      <pubDate>Sat, 11 Apr 2020 02:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639104#M21655</guid>
      <dc:creator>romonysh</dc:creator>
      <dc:date>2020-04-11T02:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639106#M21656</link>
      <description>&lt;P&gt;Cheking the zip file there are two subfolders.&lt;/P&gt;
&lt;P&gt;Why not extract the files from the zipped folder, then the filename should be:&lt;/P&gt;
&lt;P&gt;"&amp;amp;path/&lt;STRONG&gt;names/names&lt;/STRONG&gt;/yob2000.txt";&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 02:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639106#M21656</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-11T02:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639134#M21659</link>
      <description>&lt;P&gt;Rule #1 for macro development: start with code that &lt;EM&gt;works&lt;/EM&gt; for a single, non-dynamic instance. Then use macro language to make the code dynamic.&lt;/P&gt;
&lt;P&gt;This worked for me:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename zipfile zip '/folders/myfolders/names.zip';

data dsn1997;
infile zipfile(names/yob1997.txt) dlm=",";
input name $ gender $ number;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Apr 2020 10:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639134#M21659</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-11T10:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Learning Macros: ZIP file doesnt create any files.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639344#M21663</link>
      <description>This also worked as a solution! thank you!</description>
      <pubDate>Sun, 12 Apr 2020 18:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Learning-Macros-ZIP-file-doesnt-create-any-files/m-p/639344#M21663</guid>
      <dc:creator>romonysh</dc:creator>
      <dc:date>2020-04-12T18:05:33Z</dc:date>
    </item>
  </channel>
</rss>

