<?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 a list in a macro variable to create datasets in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197479#M49348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well:&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtable (where=(libname="WORK"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('proc export data=work.'||strip(memname)||' (obs=1000) outfile="...\'||strip(memname)||'.csv" dbms=csv replace; run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The ... indicates path to location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2015 14:19:43 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-04-16T14:19:43Z</dc:date>
    <item>
      <title>using a list in a macro variable to create datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197478#M49347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to create a permanent datasets that contains the first 1000 records of all the datasets in the work directory. I came up with this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let workdsets =&lt;/P&gt;&lt;P&gt;will,&lt;/P&gt;&lt;P&gt;tom,&lt;/P&gt;&lt;P&gt;danny,&lt;/P&gt;&lt;P&gt;timmy&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data datas.&amp;amp;workdsets._1000;&lt;BR /&gt;set work.&amp;amp;workdsets. (obs=1000);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data = datas.&amp;amp;workdsets._1000 &lt;BR /&gt; outfile = "/xxx/xxxx/xxx/&amp;amp;workdsets._1000.csv"&lt;BR /&gt; dbms = csv replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it didnt work. what can I do to efficiently create those data sets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;will&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197478#M49347</guid>
      <dc:creator>whijazi</dc:creator>
      <dc:date>2015-04-16T14:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: using a list in a macro variable to create datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197479#M49348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well:&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.vtable (where=(libname="WORK"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('proc export data=work.'||strip(memname)||' (obs=1000) outfile="...\'||strip(memname)||'.csv" dbms=csv replace; run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The ... indicates path to location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197479#M49348</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-16T14:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: using a list in a macro variable to create datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197480#M49349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks RW9 it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-a-list-in-a-macro-variable-to-create-datasets/m-p/197480#M49349</guid>
      <dc:creator>whijazi</dc:creator>
      <dc:date>2015-04-16T14:43:20Z</dc:date>
    </item>
  </channel>
</rss>

