<?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 macro error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209473#M51911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;running the same macro twice with different arguments and when sas starts executing the second macro&amp;nbsp; i am&amp;nbsp; getting this&amp;nbsp; below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: You cannot open WORK.xxx.DATA for output access with member-level control because WORK.xxx.DATA is in use by you &lt;/P&gt;&lt;P&gt;in resource environment Program temp1.sas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea what might be causing this guys?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2015 19:13:51 GMT</pubDate>
    <dc:creator>Tal</dc:creator>
    <dc:date>2015-06-18T19:13:51Z</dc:date>
    <item>
      <title>macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209473#M51911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;running the same macro twice with different arguments and when sas starts executing the second macro&amp;nbsp; i am&amp;nbsp; getting this&amp;nbsp; below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: You cannot open WORK.xxx.DATA for output access with member-level control because WORK.xxx.DATA is in use by you &lt;/P&gt;&lt;P&gt;in resource environment Program temp1.sas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea what might be causing this guys?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 19:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209473#M51911</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2015-06-18T19:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209474#M51912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you give us the code?&lt;/P&gt;&lt;DIV class="crossrider-nofity-50611"&gt; &lt;/DIV&gt;&lt;DIV class="crossrider-nofity-50611-top-left"&gt; &lt;/DIV&gt;&lt;DIV class="crossrider-nofity-50611-top-right"&gt; &lt;/DIV&gt;&lt;DIV class="crossrider-nofity-50611-bottom-left"&gt; &lt;/DIV&gt;&lt;DIV class="crossrider-nofity-50611-bottom-right"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 20:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209474#M51912</guid>
      <dc:creator>igbuzov</dc:creator>
      <dc:date>2015-06-18T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209475#M51913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like your macro opens the data set, but then fails to close it once it is no longer needed.&amp;nbsp; So the second run tries to open a data set that is already open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to inspect the macro to see where this happens, and add the closing logic at the right spot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 20:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209475#M51913</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-18T20:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209476#M51914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using SAS EG by any chance? If so then make sure that under "Options/Results General" you untick box "Automatically open data or results when generated".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could happen: Your macro wants to create/write to the same table twice but the table gets opened (and locked) after the first time you touch it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also would untick "Options/Data General/Automatically open data when added to project"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And under "Options/SAS Programs" have a tick in "close all open data before running code"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 01:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209476#M51914</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-19T01:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209477#M51915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes it is EG and&amp;nbsp; i changed the settings as per your instructions but still same errors. I also checked with other co-workers.They have the same options checked and they can run the code with no errors. It is exactly the same code. When i run the macro separately it works just fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-error/m-p/209477#M51915</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2015-06-19T13:06:04Z</dc:date>
    </item>
  </channel>
</rss>

