<?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: Help with Macro not Resolving in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/936132#M42072</link>
    <description>&lt;P&gt;Your macro creates the global variable &amp;amp;pop_logic, but you try to use &amp;amp;population_setup.&lt;/P&gt;
&lt;P&gt;Hint: since &amp;amp;population is expected as input to the macro, make that obvious by defining it as a parameter for the macro.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 09:04:39 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-07-18T09:04:39Z</dc:date>
    <item>
      <title>Help with Macro not Resolving</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935968#M42065</link>
      <description>&lt;P&gt;For the life of me, I can not figure out my I am getting the below error message&lt;BR /&gt;%macro population_setup;&lt;BR /&gt;%global pop_logic;&lt;BR /&gt;%if "&amp;amp;population." = "MedicareHMOH0504" %then %do;&lt;BR /&gt;%let pop_logic = payercode = 'RR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('M');&lt;BR /&gt;%end;&lt;BR /&gt;%else %if "&amp;amp;population." = "MedicareHMOH5928" %then %do;&lt;BR /&gt;%let pop_logic = (payercode in ('RR', 'NR') and ProductCode = 'H' and MemberEnrollmentAltID8 in ('R')) or &lt;BR /&gt;(payercode in ('RR', 'NR') and ProductCode = 'H' and MemberEnrollmentAltID8 in ('D', 'E') and memberenrollmentaltid12 = '');&lt;BR /&gt;%end;&lt;BR /&gt;%else %if "&amp;amp;population." = "MedicarePPO" %then %do;&lt;BR /&gt;%let pop_logic = payercode = 'RR' and ProductCode = 'P' and MemberEnrollmentAltID8 = 'Z';&lt;BR /&gt;%end;&lt;BR /&gt;%else %if "&amp;amp;population." = "MedicareSNP005" %then %do;&lt;BR /&gt;%let pop_logic = (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('H', 'I', 'J')) or &lt;BR /&gt;(payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('D', 'E') and MemberEnrollmentAltID12 = 'SNP005_YES');&lt;BR /&gt;%end;&lt;BR /&gt;%else %if "&amp;amp;population." = "MedicareSNP054" %then %do;&lt;BR /&gt;%let pop_logic = (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 = 'W') or &lt;BR /&gt;(payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('D', 'E') and MemberEnrollmentAltID12 = 'SNP054_YES');&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%population_setup;&lt;BR /&gt;%let datek = '01JAN2024'D;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/** Pull PHP Medicare members as of 01JAN2024 **/&lt;BR /&gt;proc sql;&lt;BR /&gt;create table php_mcare_mem (compress=yes) as&lt;BR /&gt;select distinct memberkey, TerminationDate, PayerCode, ProductCode, MemberEnrollmentAltID8&lt;BR /&gt;from php.ENROLL_PROMISE_FINAL_COLLAPSED as a&lt;BR /&gt;where &amp;amp;population_setup. and TerminationDate GT &amp;amp;datek.&lt;BR /&gt;order by memberkey, TerminationDate;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error Message&lt;/P&gt;
&lt;P&gt;The SAS System 09:32 Tuesday, July 16, 2024&lt;/P&gt;
&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='MY24_Medicare_CAHPS_Combined.sas';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET&lt;BR /&gt;5 ! _CLIENTPROJECTPATH='/home/ijones01/sasdata3_MI_projects_hedis_vendor/production/inovalon/programs/hedisMY2024/hos/&lt;BR /&gt;5 ! MY24_HOS.egp';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='uapp6227p.bsc.bscal.com';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='MY24_HOS.egp';&lt;BR /&gt;8 %LET&lt;BR /&gt;8 ! _SASPROGRAMFILE='/home/ijones01/sasdata3_MI_projects_hedis_vendor/production/inovalon/programs/hedisMY2024/hos/MY2&lt;BR /&gt;8 ! 4_Medicare_CAHPS_Combined.sas';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='uapp6227p.bsc.bscal.com';&lt;BR /&gt;10 &lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=SVG;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 %macro HTML5AccessibleGraphSupported;&lt;BR /&gt;15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;&lt;BR /&gt;16 %mend;&lt;BR /&gt;17 FILENAME EGHTML TEMP;&lt;BR /&gt;18 ODS HTML5(ID=EGHTML) FILE=EGHTML&lt;BR /&gt;19 OPTIONS(BITMAP_MODE='INLINE')&lt;BR /&gt;20 %HTML5AccessibleGraphSupported&lt;BR /&gt;21 ENCODING='utf-8'&lt;BR /&gt;22 STYLE=HtmlBlue&lt;BR /&gt;23 NOGTITLE&lt;BR /&gt;24 NOGFOOTNOTE&lt;BR /&gt;25 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;26 ;&lt;BR /&gt;NOTE: Writing HTML5(EGHTML) Body file: EGHTML&lt;BR /&gt;27 &lt;BR /&gt;28 libname MCAHPS '/sasdata3_MI_projects_hedis_vendor/production/inovalon/programs/hedisMY2024/hos';&lt;BR /&gt;NOTE: Libref MCAHPS was successfully assigned as follows: &lt;BR /&gt;Engine: V9 &lt;BR /&gt;Physical Name: /sasdata3_MI_projects_hedis_vendor/production/inovalon/programs/hedisMY2024/hos&lt;BR /&gt;29 libname php '/sasdata3_MI_projects_hedis_vendor/production/inovprev/data/extract/membership/php';&lt;BR /&gt;NOTE: Libref PHP was successfully assigned as follows: &lt;BR /&gt;Engine: V9 &lt;BR /&gt;Physical Name: /sasdata3_MI_projects_hedis_vendor/production/inovprev/data/extract/membership/php&lt;BR /&gt;30 libname bsc '/sasdata3_MI_projects_hedis_vendor/production/inovprev/data/extract/membership/';&lt;BR /&gt;NOTE: Libref BSC was successfully assigned as follows: &lt;BR /&gt;Engine: V9 &lt;BR /&gt;Physical Name: /sasdata3_MI_projects_hedis_vendor/production/inovprev/data/extract/membership&lt;BR /&gt;31 libname bsc_prvd '/sasdata3_MI_projects_hedis_vendor/production/inovprev/data/final';&lt;BR /&gt;NOTE: Libref BSC_PRVD was successfully assigned as follows: &lt;BR /&gt;Engine: V9 &lt;BR /&gt;Physical Name: /sasdata3_MI_projects_hedis_vendor/production/inovprev/data/final&lt;BR /&gt;32 %macro population_setup;&lt;BR /&gt;33 %global pop_logic;&lt;BR /&gt;34 %if "&amp;amp;population." = "MedicareHMOH0504" %then %do;&lt;BR /&gt;35 %let pop_logic = payercode = 'RR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('M');&lt;BR /&gt;36 %end;&lt;BR /&gt;37 %else %if "&amp;amp;population." = "MedicareHMOH5928" %then %do;&lt;BR /&gt;38 %let pop_logic = (payercode in ('RR', 'NR') and ProductCode = 'H' and MemberEnrollmentAltID8 in&lt;BR /&gt;2 The SAS System 09:32 Tuesday, July 16, 2024&lt;/P&gt;
&lt;P&gt;38 ! ('R')) or&lt;BR /&gt;39 (payercode in ('RR', 'NR') and ProductCode = 'H' and MemberEnrollmentAltID8 in&lt;BR /&gt;39 ! ('D', 'E') and memberenrollmentaltid12 = '');&lt;BR /&gt;40 %end;&lt;BR /&gt;41 %else %if "&amp;amp;population." = "MedicarePPO" %then %do;&lt;BR /&gt;42 %let pop_logic = payercode = 'RR' and ProductCode = 'P' and MemberEnrollmentAltID8 = 'Z';&lt;BR /&gt;43 %end;&lt;BR /&gt;44 %else %if "&amp;amp;population." = "MedicareSNP005" %then %do;&lt;BR /&gt;45 %let pop_logic = (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('H', 'I',&lt;BR /&gt;45 ! 'J')) or&lt;BR /&gt;46 (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('D', 'E')&lt;BR /&gt;46 ! and MemberEnrollmentAltID12 = 'SNP005_YES');&lt;BR /&gt;47 %end;&lt;BR /&gt;48 %else %if "&amp;amp;population." = "MedicareSNP054" %then %do;&lt;BR /&gt;49 %let pop_logic = (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 = 'W') or&lt;BR /&gt;50 (payercode = 'NR' and ProductCode = 'H' and MemberEnrollmentAltID8 in ('D', 'E')&lt;BR /&gt;50 ! and MemberEnrollmentAltID12 = 'SNP054_YES');&lt;BR /&gt;51 %end;&lt;BR /&gt;52 %mend;&lt;BR /&gt;53 %population_setup;&lt;BR /&gt;54 %let datek = '01JAN2024'D;&lt;BR /&gt;55 &lt;BR /&gt;56 &lt;BR /&gt;57 &lt;BR /&gt;58 /** Pull PHP Medicare members as of 01JAN2024 **/&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;59 proc sql;&lt;BR /&gt;60 create table php_mcare_mem (compress=yes) as&lt;BR /&gt;61 select distinct memberkey, TerminationDate, PayerCode, ProductCode, MemberEnrollmentAltID8&lt;BR /&gt;62 from php.ENROLL_PROMISE_FINAL_COLLAPSED as a&lt;BR /&gt;63 where &amp;amp;population_setup. and TerminationDate GT &amp;amp;datek.&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;WARNING: Apparent symbolic reference POPULATION_SETUP not resolved.&lt;BR /&gt;63 where &amp;amp;population_setup. and TerminationDate GT &amp;amp;datek.&lt;BR /&gt;_______________&lt;BR /&gt;22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, &lt;BR /&gt;a datetime constant, a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, EQT, GE, &lt;BR /&gt;GET, GROUP, GT, GTT, HAVING, LE, LET, LT, LTT, NE, NET, OR, ORDER, ^=, |, ||, ~=.&lt;/P&gt;
&lt;P&gt;63 where &amp;amp;population_setup. and TerminationDate GT &amp;amp;datek.&lt;BR /&gt;_______________&lt;BR /&gt;76&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;
&lt;P&gt;64 order by memberkey, TerminationDate;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;65 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;3 The SAS System 09:32 Tuesday, July 16, 2024&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;66 &lt;BR /&gt;67 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;68 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;69 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;70 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;71 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;72 %LET _SASPROGRAMFILE=;&lt;BR /&gt;73 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;74 &lt;BR /&gt;75 ;*';*";*/;quit;run;&lt;BR /&gt;76 ODS _ALL_ CLOSE;&lt;BR /&gt;77 &lt;BR /&gt;78 &lt;BR /&gt;79 QUIT; RUN;&lt;BR /&gt;80&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 22:39:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935968#M42065</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2024-07-16T22:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Macro not Resolving</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935969#M42066</link>
      <description>&lt;P&gt;It is a little hard to read your post since you pasted the log into the normal editor window as if it was paragraphs of text you were typing.&amp;nbsp; Next time use the Insert Code button to get a pop-up window to paste/edit your text and then it will be displayed as-is using monospace font.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you defined a macro named&amp;nbsp;&lt;SPAN&gt;POPULATION_SETUP&amp;nbsp;and then were able to call it using %POPULATION_SETUP&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But then later on you tried to reference a macro variable with the same name by using &amp;amp;POPULATION_SETUP.&amp;nbsp; But I do not see any place where you ever tried to define such a macro variable.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 22:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935969#M42066</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-16T22:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Macro not Resolving</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935971#M42067</link>
      <description>&lt;P&gt;In this code you reference a macro variable &amp;amp;population_setup.&amp;nbsp; Where do you think a value of that macro variable is assigned?&lt;/P&gt;
&lt;PRE&gt;proc sql;
create table php_mcare_mem (compress=yes) as
select distinct memberkey, TerminationDate, PayerCode, ProductCode, MemberEnrollmentAltID8
from php.ENROLL_PROMISE_FINAL_COLLAPSED as a
where &lt;FONT color="#800080"&gt;&lt;STRONG&gt;&amp;amp;population_setup.&lt;/STRONG&gt;&lt;/FONT&gt; and TerminationDate GT &amp;amp;datek.
order by memberkey, TerminationDate;
quit;&lt;/PRE&gt;
&lt;P&gt;Also your macro %population_setup repeatedly uses&amp;nbsp; a macro variable &amp;amp;Population that I do not see an assignment for anywhere such as a %let, Call symput or Symputx or SQL into: .&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 22:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/935971#M42067</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-16T22:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Macro not Resolving</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/936132#M42072</link>
      <description>&lt;P&gt;Your macro creates the global variable &amp;amp;pop_logic, but you try to use &amp;amp;population_setup.&lt;/P&gt;
&lt;P&gt;Hint: since &amp;amp;population is expected as input to the macro, make that obvious by defining it as a parameter for the macro.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 09:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/936132#M42072</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-07-18T09:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Macro not Resolving</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/936215#M42073</link>
      <description>Thank you!!!!!!!!&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jul 2024 15:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-Macro-not-Resolving/m-p/936215#M42073</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2024-07-18T15:55:17Z</dc:date>
    </item>
  </channel>
</rss>

