<?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 HELP with macro coding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/HELP-with-macro-coding/m-p/419805#M280522</link>
    <description>&lt;P&gt;Help my macro code is not working&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the question I am asked:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;. Assess mean differences in percent weight change by categories of BMI and by the number of children using regression models.&amp;nbsp; The dependent (outcome) variable each time should be percent weight change.&amp;nbsp; The main independent variable would be either BMI categories or number of children.&amp;nbsp; Use one macro with two parameters to complete this question.&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Test the mean difference in percent weight change by BMI category in three models:&lt;OL&gt;&lt;LI&gt;Unadjusted (Model 1)&lt;/LI&gt;&lt;LI&gt;Adjusted for age (Model 2)&lt;/LI&gt;&lt;LI&gt;Adjusted for age and menopause status (Model 3)&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Test the mean difference in percent weight change by number of children (categorical variable) in three models:&lt;/LI&gt;&lt;LI&gt;Unadjusted&lt;/LI&gt;&lt;LI&gt;Adjusted for age&lt;/LI&gt;&lt;LI&gt;Adjusted for age, BMI and menopause status&lt;/LI&gt;&lt;LI&gt;From the above analysis, complete Table 3, making sure you report adjusted means when more than a single variable is included in the model (Type 3 SS). Also make sure you report p-values adjusted for multiple comparisons for categorical variables with more than two levels (use the Bonferroni correction for multiple comparisons).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro myglm(class=, indep=);&lt;BR /&gt;proc glm data=&amp;amp;PJ123;&lt;BR /&gt;class &amp;amp;class;&lt;BR /&gt;model WTPCT = &amp;amp;class &amp;amp;indep;&lt;BR /&gt;means &amp;amp;class;&lt;BR /&gt;lsmeans &amp;amp;class / adjust=bon stderr pdiff;&lt;BR /&gt;run;&lt;BR /&gt;%mend myglm;&lt;/P&gt;&lt;P&gt;%myglm (class=BMICAT);&lt;BR /&gt;%myglm (class=BMICAT, indep=Age);&lt;BR /&gt;%myglm (class=BMICAT MNP, indep=Age);&lt;BR /&gt;%myglm (class=NKIDS);&lt;BR /&gt;%myglm (class=NKIDS, indep=Age);&lt;BR /&gt;%myglm (class=NKIDS BMI MNP, indep=Age);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;326&lt;BR /&gt;327 %macro myglm(class=, indep=);&lt;BR /&gt;328 proc glm data=&amp;amp;PJ123;&lt;BR /&gt;329 class &amp;amp;class;&lt;BR /&gt;330 model WTPCT = &amp;amp;class &amp;amp;indep;&lt;BR /&gt;331 means &amp;amp;class;&lt;BR /&gt;332 lsmeans &amp;amp;class / adjust=bon stderr pdiff;&lt;BR /&gt;333 run;&lt;BR /&gt;334 %mend myglm;&lt;BR /&gt;335&lt;BR /&gt;336 %myglm (class=BMICAT);&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! ; lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;337 %myglm (class=BMICAT, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;338 %myglm (class=BMICAT MNP, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;339 %myglm (class=NKIDS);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;340 %myglm (class=NKIDS, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;341 %myglm (class=NKIDS BMI MNP, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;/P&gt;</description>
    <pubDate>Sat, 09 Dec 2017 13:53:13 GMT</pubDate>
    <dc:creator>eee100</dc:creator>
    <dc:date>2017-12-09T13:53:13Z</dc:date>
    <item>
      <title>HELP with macro coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HELP-with-macro-coding/m-p/419805#M280522</link>
      <description>&lt;P&gt;Help my macro code is not working&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the question I am asked:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;. Assess mean differences in percent weight change by categories of BMI and by the number of children using regression models.&amp;nbsp; The dependent (outcome) variable each time should be percent weight change.&amp;nbsp; The main independent variable would be either BMI categories or number of children.&amp;nbsp; Use one macro with two parameters to complete this question.&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Test the mean difference in percent weight change by BMI category in three models:&lt;OL&gt;&lt;LI&gt;Unadjusted (Model 1)&lt;/LI&gt;&lt;LI&gt;Adjusted for age (Model 2)&lt;/LI&gt;&lt;LI&gt;Adjusted for age and menopause status (Model 3)&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Test the mean difference in percent weight change by number of children (categorical variable) in three models:&lt;/LI&gt;&lt;LI&gt;Unadjusted&lt;/LI&gt;&lt;LI&gt;Adjusted for age&lt;/LI&gt;&lt;LI&gt;Adjusted for age, BMI and menopause status&lt;/LI&gt;&lt;LI&gt;From the above analysis, complete Table 3, making sure you report adjusted means when more than a single variable is included in the model (Type 3 SS). Also make sure you report p-values adjusted for multiple comparisons for categorical variables with more than two levels (use the Bonferroni correction for multiple comparisons).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro myglm(class=, indep=);&lt;BR /&gt;proc glm data=&amp;amp;PJ123;&lt;BR /&gt;class &amp;amp;class;&lt;BR /&gt;model WTPCT = &amp;amp;class &amp;amp;indep;&lt;BR /&gt;means &amp;amp;class;&lt;BR /&gt;lsmeans &amp;amp;class / adjust=bon stderr pdiff;&lt;BR /&gt;run;&lt;BR /&gt;%mend myglm;&lt;/P&gt;&lt;P&gt;%myglm (class=BMICAT);&lt;BR /&gt;%myglm (class=BMICAT, indep=Age);&lt;BR /&gt;%myglm (class=BMICAT MNP, indep=Age);&lt;BR /&gt;%myglm (class=NKIDS);&lt;BR /&gt;%myglm (class=NKIDS, indep=Age);&lt;BR /&gt;%myglm (class=NKIDS BMI MNP, indep=Age);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;326&lt;BR /&gt;327 %macro myglm(class=, indep=);&lt;BR /&gt;328 proc glm data=&amp;amp;PJ123;&lt;BR /&gt;329 class &amp;amp;class;&lt;BR /&gt;330 model WTPCT = &amp;amp;class &amp;amp;indep;&lt;BR /&gt;331 means &amp;amp;class;&lt;BR /&gt;332 lsmeans &amp;amp;class / adjust=bon stderr pdiff;&lt;BR /&gt;333 run;&lt;BR /&gt;334 %mend myglm;&lt;BR /&gt;335&lt;BR /&gt;336 %myglm (class=BMICAT);&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! ; lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;337 %myglm (class=BMICAT, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;338 %myglm (class=BMICAT MNP, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;339 %myglm (class=NKIDS);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;340 %myglm (class=NKIDS, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;BR /&gt;341 %myglm (class=NKIDS BMI MNP, indep=Age);&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the invoked macro "MYGLM".&lt;BR /&gt;1 proc glm data=&amp;amp;PJ123; class &amp;amp;class; model WTPCT = &amp;amp;class &amp;amp;indep; means &amp;amp;class;&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;1 ! lsmeans &amp;amp;class / adjust=bon stderr pdiff; run;&lt;BR /&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;BR /&gt;NOTE: Data file WORK.PJ123.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be used,&lt;BR /&gt;which might require additional CPU resources and might reduce performance.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;BR /&gt;ERROR: Only CLASS variables allowed in this effect.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;ERROR: A MODEL statement must be given.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 13:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HELP-with-macro-coding/m-p/419805#M280522</guid>
      <dc:creator>eee100</dc:creator>
      <dc:date>2017-12-09T13:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: HELP with macro coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HELP-with-macro-coding/m-p/419808#M280523</link>
      <description>&lt;PRE&gt;WARNING: Apparent symbolic reference PJ123 not resolved.&lt;/PRE&gt;
&lt;P&gt;You never defined macro variable PJ123&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 13:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HELP-with-macro-coding/m-p/419808#M280523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-09T13:57:01Z</dc:date>
    </item>
  </channel>
</rss>

