<?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 not getting resolved in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637741#M189605</link>
    <description>&lt;P&gt;Hi experts,&lt;/P&gt;
&lt;P&gt;I have libname statements for folder1...folder10. Each folder have some .sas7bdat files.&lt;/P&gt;
&lt;P&gt;I need to pick some .sas7bdat files of my interest from the folder of my choice and merge them later. So, for the below written macro statements i need help to figure out why the macro is not getting resolved.&lt;/P&gt;
&lt;P&gt;%let file_a=randomisation;&lt;/P&gt;
&lt;P&gt;%let file_b=Screening;&lt;/P&gt;
&lt;P&gt;data rand;&lt;BR /&gt;merge folder5.&amp;amp;file_a.(in=a)&amp;nbsp; folder6.&amp;amp;file_b.(in=b);&lt;BR /&gt;by PatientInitials;if a=1;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: User does not have appropriate authorization level for file FOLDER5.RANDOMISATION.DATA.&lt;/P&gt;
&lt;P&gt;ERROR: User does not have appropriate authorization level for file FOLDER6.SCREENING.DATA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it works,when i do below:&lt;/P&gt;
&lt;P&gt;data a;set folder5.randomisation;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data b;set folder6.screening;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then, data rand;merge a b;by var;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anybody explain why merge statement doesn't directly resolves&amp;nbsp;folder5.&amp;amp;file_a. and&amp;nbsp;folder6.&amp;amp;file_b?&lt;/P&gt;</description>
    <pubDate>Sun, 05 Apr 2020 22:15:31 GMT</pubDate>
    <dc:creator>sahoositaram555</dc:creator>
    <dc:date>2020-04-05T22:15:31Z</dc:date>
    <item>
      <title>Macro not getting resolved</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637741#M189605</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
&lt;P&gt;I have libname statements for folder1...folder10. Each folder have some .sas7bdat files.&lt;/P&gt;
&lt;P&gt;I need to pick some .sas7bdat files of my interest from the folder of my choice and merge them later. So, for the below written macro statements i need help to figure out why the macro is not getting resolved.&lt;/P&gt;
&lt;P&gt;%let file_a=randomisation;&lt;/P&gt;
&lt;P&gt;%let file_b=Screening;&lt;/P&gt;
&lt;P&gt;data rand;&lt;BR /&gt;merge folder5.&amp;amp;file_a.(in=a)&amp;nbsp; folder6.&amp;amp;file_b.(in=b);&lt;BR /&gt;by PatientInitials;if a=1;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: User does not have appropriate authorization level for file FOLDER5.RANDOMISATION.DATA.&lt;/P&gt;
&lt;P&gt;ERROR: User does not have appropriate authorization level for file FOLDER6.SCREENING.DATA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it works,when i do below:&lt;/P&gt;
&lt;P&gt;data a;set folder5.randomisation;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data b;set folder6.screening;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then, data rand;merge a b;by var;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anybody explain why merge statement doesn't directly resolves&amp;nbsp;folder5.&amp;amp;file_a. and&amp;nbsp;folder6.&amp;amp;file_b?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 22:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637741#M189605</guid>
      <dc:creator>sahoositaram555</dc:creator>
      <dc:date>2020-04-05T22:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not getting resolved</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637742#M189606</link>
      <description>&lt;P&gt;Show the lines from the LOG. Make sure to use the Insert Code button (looks like &amp;lt; / &amp;gt; ) so you get a pop-up window to paste the lines so the formatting is preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message makes it sound like you let the semi-colon off the end of your data statement so that it thought you wanted to create those datasets instead of read from those datasets.&lt;/P&gt;
&lt;P&gt;Code like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rand merge folder5.&amp;amp;file_a. folder6.&amp;amp;file_b. ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is instructions to create four datasets: rand, merge and the other two.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 22:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637742#M189606</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-05T22:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not getting resolved</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637749#M189608</link>
      <description>&lt;P&gt;You are not showing the problem.&lt;/P&gt;
&lt;P&gt;The macro variables get resolved as indicated by the error messages.&lt;/P&gt;
&lt;P&gt;Show us the codes and the logs.&lt;/P&gt;
&lt;P&gt;The error points to an authorisation issue, so I suspect the libname folders are different, or the table creators are different, or something along these lines.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 22:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-not-getting-resolved/m-p/637749#M189608</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-04-05T22:59:39Z</dc:date>
    </item>
  </channel>
</rss>

