<?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: MAcro erros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495697#M130880</link>
    <description>&lt;P&gt;We cannot see what data you are running the code against, so no we cannot tell you what is wrong.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 14:19:37 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-09-14T14:19:37Z</dc:date>
    <item>
      <title>MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495675#M130867</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;when i run the below code, i have some syntax error.&lt;/P&gt;&lt;P&gt;please help me to compile them without error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/****************************************************************************************************/&lt;BR /&gt;/* Check missing LOS 1 */&lt;BR /&gt;/****************************************************************************************************/&lt;BR /&gt;%macro Check_LOS;&lt;BR /&gt;%do x=1 %to &amp;amp;Month.;&lt;BR /&gt;data M&amp;amp;x;&lt;BR /&gt;set &amp;amp;FieldFileAppnd.;&lt;BR /&gt;if (month=(1+&amp;amp;x) and los=2);&lt;BR /&gt;run;&lt;BR /&gt;%create_list(M&amp;amp;x, agent_code, A&amp;amp;x, 2);&lt;BR /&gt;%put &amp;amp;&amp;amp;A.&amp;amp;x.;&lt;BR /&gt;proc print data=&amp;amp;FieldFileAppnd.; var agent_code club month los rank status; where agent_code in (&amp;amp;&amp;amp;A&amp;amp;x); run;&lt;/P&gt;&lt;P&gt;data L&amp;amp;x;&lt;BR /&gt;set &amp;amp;FieldFileAppnd.;&lt;BR /&gt;if agent_code in (&amp;amp;&amp;amp;A&amp;amp;x);&lt;BR /&gt;if month=&amp;amp;x and los=0;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=L&amp;amp;x; var agent_code club month los rank status; run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%Check_LOS;&lt;/P&gt;&lt;P&gt;%macro LOS_Merge;&lt;BR /&gt;data LOS_Merge;&lt;BR /&gt;set %do x=1 %to &amp;amp;Month.; L&amp;amp;x %end;;&lt;BR /&gt;run;&lt;BR /&gt;/*%end;*/&lt;BR /&gt;%mend;&lt;BR /&gt;%LOS_Merge;&lt;/P&gt;&lt;P&gt;proc sort data=LOS_Merge; by agent_code month los; run;&lt;BR /&gt;proc print data=LOS_Merge; var agent_code club month los rank status; run;&lt;/P&gt;&lt;P&gt;/* Check missing LOS 1 - Join to Field File to pull other fields */&lt;BR /&gt;proc sql;&lt;BR /&gt;create table LOS_Check as&lt;BR /&gt;select a.agent_code, a.club, a.month, a.los, a.rank, a.status, b.agent_code&lt;BR /&gt;from &amp;amp;FieldFileAppnd. as a, LOS_Merge as b&lt;BR /&gt;where a.agent_code=b.agent_code;&lt;BR /&gt;quit;&lt;BR /&gt;proc sort data=LOS_Check; by agent_code month; run;&lt;/P&gt;&lt;P&gt;title1 'Check missing LOS 1';&lt;BR /&gt;proc print data=LOS_Check; run;&lt;BR /&gt;proc export data=LOS_Check&lt;BR /&gt;outfile="&amp;amp;Dir.\FFIssues"&lt;BR /&gt;dbms=xlsx replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable X resolves to 8&lt;BR /&gt;NOTE 137-205: Line generated by the invoked macro "CHECK_LOS".&lt;BR /&gt;38 proc print data=&amp;amp;FieldFileAppnd.; var agent_code club month los rank status; where&lt;BR /&gt;38 ! agent_code in (&amp;amp;&amp;amp;A&amp;amp;x); run; data L&amp;amp;x; set &amp;amp;FieldFileAppnd.; if agent_code in&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;38 ! (&amp;amp;&amp;amp;A&amp;amp;x); if month=&amp;amp;x and los=0; run; proc print data=L&amp;amp;x; var agent_code club&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string,&lt;BR /&gt;a numeric constant, a datetime constant, a missing value.&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "CHECK_LOS".&lt;BR /&gt;38 proc print data=&amp;amp;FieldFileAppnd.; var agent_code club month los rank status; where&lt;BR /&gt;38 ! agent_code in (&amp;amp;&amp;amp;A&amp;amp;x); run; data L&amp;amp;x; set &amp;amp;FieldFileAppnd.; if agent_code in&lt;BR /&gt;-&lt;BR /&gt;76&lt;BR /&gt;38 ! (&amp;amp;&amp;amp;A&amp;amp;x); if month=&amp;amp;x and los=0; run; proc print data=L&amp;amp;x; var agent_code club&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable A8 resolves to&lt;BR /&gt;MPRINT(CHECK_LOS): where agent_code in ();&lt;BR /&gt;ERROR: Syntax error while parsing WHERE clause.&lt;BR /&gt;MPRINT(CHECK_LOS): run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 13:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495675#M130867</guid>
      <dc:creator>sg_kr</dc:creator>
      <dc:date>2018-09-14T13:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495687#M130873</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Macro variable A8 resolves to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MPRINT(CHECK_LOS): where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your problem is described there, there is no macro variable called A8 at that point, so the line generated:&amp;nbsp;where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;is invalid.&amp;nbsp; There is nothing to work with, no test data in the form of a datastep etc. to test anything.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a tip though, if your writing code like:&amp;nbsp;&amp;amp;&amp;amp;A&amp;amp;x&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then 100% there is a far better and simpler method of doing whatever it is you want to achieve.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495687#M130873</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-14T14:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495690#M130875</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have reformatted your code so that it is more readable :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/****************************************************************************************************/
/* Check missing LOS 1 */
/****************************************************************************************************/
%macro Check_LOS;
    %do x=1 %to &amp;amp;Month.;
        data M&amp;amp;x;
            set &amp;amp;FieldFileAppnd.;
            if (month=(1+&amp;amp;x) and los=2);
        run;

        %create_list(M&amp;amp;x, agent_code, A&amp;amp;x, 2);
        
        proc print data=&amp;amp;FieldFileAppnd.; 
            var agent_code club month los rank status; where agent_code in (&amp;amp;&amp;amp;A&amp;amp;x); 
        run;

        data L&amp;amp;x;
            set &amp;amp;FieldFileAppnd.;
            if agent_code in (&amp;amp;&amp;amp;A&amp;amp;x);
            if month=&amp;amp;x and los=0;
        run;
        
        proc print data=L&amp;amp;x; 
            var agent_code club month los rank status; 
        run;
    %end;
%mend;

%Check_LOS;

%macro LOS_Merge;
    data LOS_Merge;
        set %do x=1 %to &amp;amp;Month.; L&amp;amp;x %end;;
    run;
%mend;

%LOS_Merge;

proc sort data=LOS_Merge; by agent_code month los; run;

proc print data=LOS_Merge; 
    var agent_code club month los rank status; 
run;

/* Check missing LOS 1 - Join to Field File to pull other fields */
proc sql;
    create table LOS_Check as
    select a.agent_code, a.club, a.month, a.los, a.rank, a.status, b.agent_code
    from &amp;amp;FieldFileAppnd. as a, LOS_Merge as b
    where a.agent_code=b.agent_code;
quit;

proc sort data=LOS_Check; by agent_code month; run;

title1 'Check missing LOS 1';

proc print data=LOS_Check; run;

proc export data=LOS_Check
    outfile="&amp;amp;Dir.\FFIssues"
    dbms=xlsx replace;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since you don't provide data and some macrovariables/macro functions are not defined, it is impossible for us to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;replicate your problem. From the log, macrovariable A8 resolves to an empty string resulting in&lt;/P&gt;
&lt;P&gt;syntactically incorrect code such as "where agent_code in ()".&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495690#M130875</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-09-14T14:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495694#M130878</link>
      <description>&lt;P&gt;when i use agent_code in (&amp;amp;&amp;amp;A&amp;amp;x), i am getting the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23279iA785E7766DB43592/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.PNG" alt="error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Macro variable A8 resolves to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MPRINT(CHECK_LOS): where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Your problem is described there, there is no macro variable called A8 at that point, so the line generated:&amp;nbsp;where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is invalid.&amp;nbsp; There is nothing to work with, no test data in the form of a datastep etc. to test anything.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As a tip though, if your writing code like:&amp;nbsp;&amp;amp;&amp;amp;A&amp;amp;x&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then 100% there is a far better and simpler method of doing whatever it is you want to achieve.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Macro variable A8 resolves to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MPRINT(CHECK_LOS): where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Your problem is described there, there is no macro variable called A8 at that point, so the line generated:&amp;nbsp;where agent_code in ();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is invalid.&amp;nbsp; There is nothing to work with, no test data in the form of a datastep etc. to test anything.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As a tip though, if your writing code like:&amp;nbsp;&amp;amp;&amp;amp;A&amp;amp;x&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then 100% there is a far better and simpler method of doing whatever it is you want to achieve.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to know why its hapening, can you please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495694#M130878</guid>
      <dc:creator>sg_kr</dc:creator>
      <dc:date>2018-09-14T14:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495696#M130879</link>
      <description>&lt;P&gt;We can't help with the information you provided since the problem concerns a macrovariable, A8,&lt;/P&gt;
&lt;P&gt;for which we have no idea of how it was created and what its purpose is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it normal that A8 is blank ? What should be done in such case ? Only you know the answers.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495696#M130879</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-09-14T14:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495697#M130880</link>
      <description>&lt;P&gt;We cannot see what data you are running the code against, so no we cannot tell you what is wrong.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495697#M130880</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-14T14:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495708#M130887</link>
      <description>&lt;P&gt;Is there a specific reason you're breaking your data into months like this?&lt;/P&gt;
&lt;P&gt;There's probably a data step solution here without the need for any macro variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you essentially do GROUP processing without a single BY statement that is flag that you're probably doing too much work to get the results you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code also calls another macro create_list that seems to generate the problematic macro variable. That may be the issue and we cannot see that code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30622"&gt;@gamotte&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have reformatted your code so that it is more readable :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/****************************************************************************************************/
/* Check missing LOS 1 */
/****************************************************************************************************/
%macro Check_LOS;
    %do x=1 %to &amp;amp;Month.;
        data M&amp;amp;x;
            set &amp;amp;FieldFileAppnd.;
            if (month=(1+&amp;amp;x) and los=2);
        run;

        %create_list(M&amp;amp;x, agent_code, A&amp;amp;x, 2);
        
        proc print data=&amp;amp;FieldFileAppnd.; 
            var agent_code club month los rank status; where agent_code in (&amp;amp;&amp;amp;A&amp;amp;x); 
        run;

        data L&amp;amp;x;
            set &amp;amp;FieldFileAppnd.;
            if agent_code in (&amp;amp;&amp;amp;A&amp;amp;x);
            if month=&amp;amp;x and los=0;
        run;
        
        proc print data=L&amp;amp;x; 
            var agent_code club month los rank status; 
        run;
    %end;
%mend;

%Check_LOS;

%macro LOS_Merge;
    data LOS_Merge;
        set %do x=1 %to &amp;amp;Month.; L&amp;amp;x %end;;
    run;
%mend;

%LOS_Merge;

proc sort data=LOS_Merge; by agent_code month los; run;

proc print data=LOS_Merge; 
    var agent_code club month los rank status; 
run;

/* Check missing LOS 1 - Join to Field File to pull other fields */
proc sql;
    create table LOS_Check as
    select a.agent_code, a.club, a.month, a.los, a.rank, a.status, b.agent_code
    from &amp;amp;FieldFileAppnd. as a, LOS_Merge as b
    where a.agent_code=b.agent_code;
quit;

proc sort data=LOS_Check; by agent_code month; run;

title1 'Check missing LOS 1';

proc print data=LOS_Check; run;

proc export data=LOS_Check
    outfile="&amp;amp;Dir.\FFIssues"
    dbms=xlsx replace;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since you don't provide data and some macrovariables/macro functions are not defined, it is impossible for us to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;replicate your problem. From the log, macrovariable A8 resolves to an empty string resulting in&lt;/P&gt;
&lt;P&gt;syntactically incorrect code such as "where agent_code in ()".&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495708#M130887</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-14T14:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495738#M130903</link>
      <description>here the full code:&lt;BR /&gt;/****************************************************************************************************/&lt;BR /&gt;/* Check missing LOS 1 */&lt;BR /&gt;/****************************************************************************************************/&lt;BR /&gt;%macro Check_LOS;&lt;BR /&gt;%do x=1 %to &amp;amp;Month.;&lt;BR /&gt;data M&amp;amp;x;&lt;BR /&gt;set &amp;amp;FieldFileAppnd.;&lt;BR /&gt;if (month=(1+&amp;amp;x) and los=2);&lt;BR /&gt;run;&lt;BR /&gt;%create_list(M&amp;amp;x, agent_code, A&amp;amp;x, 2);&lt;BR /&gt;%put &amp;amp;&amp;amp;A.&amp;amp;x.;&lt;BR /&gt;proc print data=&amp;amp;FieldFileAppnd.; var agent_code club month los rank status; where agent_code in (&amp;amp;&amp;amp;A&amp;amp;x.); run;&lt;BR /&gt;&lt;BR /&gt;data L&amp;amp;x;&lt;BR /&gt;set &amp;amp;FieldFileAppnd.;&lt;BR /&gt;if agent_code in (&amp;amp;&amp;amp;A&amp;amp;x.);&lt;BR /&gt;if month=&amp;amp;x and los=0;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=L&amp;amp;x; var agent_code club month los rank status; run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%Check_LOS;&lt;BR /&gt;&lt;BR /&gt;%macro LOS_Merge;&lt;BR /&gt;data LOS_Merge;&lt;BR /&gt;set %do x=1 %to &amp;amp;Month.; L&amp;amp;x %end;;&lt;BR /&gt;run;&lt;BR /&gt;/*%end;*/&lt;BR /&gt;%mend;&lt;BR /&gt;%LOS_Merge;&lt;BR /&gt;&lt;BR /&gt;proc sort data=LOS_Merge; by agent_code month los; run;&lt;BR /&gt;proc print data=LOS_Merge; var agent_code club month los rank status; run;&lt;BR /&gt;&lt;BR /&gt;/* Check missing LOS 1 - Join to Field File to pull other fields */&lt;BR /&gt;proc sql;&lt;BR /&gt;create table LOS_Check as&lt;BR /&gt;select a.agent_code, a.club, a.month, a.los, a.rank, a.status, b.agent_code&lt;BR /&gt;from &amp;amp;FieldFileAppnd. as a, LOS_Merge as b&lt;BR /&gt;where a.agent_code=b.agent_code;&lt;BR /&gt;quit;&lt;BR /&gt;proc sort data=LOS_Check; by agent_code month; run;&lt;BR /&gt;&lt;BR /&gt;title1 'Check missing LOS 1';&lt;BR /&gt;proc print data=LOS_Check; run;&lt;BR /&gt;proc export data=LOS_Check&lt;BR /&gt;outfile="&amp;amp;Dir.\FFIssues"&lt;BR /&gt;dbms=xlsx replace;&lt;BR /&gt;run;</description>
      <pubDate>Fri, 14 Sep 2018 15:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495738#M130903</guid>
      <dc:creator>sg_kr</dc:creator>
      <dc:date>2018-09-14T15:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: MAcro erros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495741#M130905</link>
      <description>&lt;P&gt;If that is the full program you should be getting earlier error messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing that code&amp;nbsp;tries to run is the call to the macro CHECK_LOS.&amp;nbsp; And the first thing that macro does is reference the macro variable MONTH.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is nothing in the code you posted to create the macro variable MONTH.&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;SPAN&gt;FieldFileAppnd&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;or any dataset that might be named by the value in&amp;nbsp;&lt;SPAN&gt;FieldFileAppnd, if it existed.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 15:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MAcro-erros/m-p/495741#M130905</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-14T15:38:56Z</dc:date>
    </item>
  </channel>
</rss>

