<?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: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791590#M253583</link>
    <description>Tom, I have made numerous adjustments as per your suggestions, but nothing seems to work. Just following up.</description>
    <pubDate>Fri, 21 Jan 2022 20:34:59 GMT</pubDate>
    <dc:creator>gbougalis</dc:creator>
    <dc:date>2022-01-21T20:34:59Z</dc:date>
    <item>
      <title>SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791425#M253491</link>
      <description>&lt;P&gt;I am trying to run a Macro Program ; but am receiving these Errors :&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR:22-322 and ERROR:76-322. According to my SAS LOG I have narrowed down the location of the error/errors in the Attached part of the Program. Any/all help would be greatly appreciated. I am attaching two separate screenshots : 1.) What my SAS LOG is showing me 2.) The piece of code associated with the error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
36         
37         %compare_all ;
37                 new_observations=case(memname)
                   ________________
                   22
                   76
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, GET, 
              GT, GTT, LE, LET, LT, LTT, NE, NET, OR, WHEN, ^=, |, ||, ~=.  

ERROR 76-322: Syntax error, statement will be ignored.&lt;/PRE&gt;&lt;P&gt;Here is the part of the code/logic where the SAS LOG is telling me the error is occurring :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;update _var_obs_compare
           set lost_observations=case(memname)
             %do i = 1 %to &amp;amp;ndata;
                 when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then &amp;amp;&amp;amp;removed&amp;amp;i;
			else . 
			%end ;			 
			new_observations=case(memname)
             %do i = 1 %to &amp;amp;ndata;
                 when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then &amp;amp;&amp;amp;added&amp;amp;i;
			 else .  
			%end ; 
             data_changes=case(memname)
             %do i = 1 %to &amp;amp;ndata;
                 when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then &amp;amp;&amp;amp;any_diff&amp;amp;i;
			else .  
			%end ; 
             id_variables=case(memname)
             %do i = 1 %to &amp;amp;ndata;
                 when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then tranwrd("&amp;amp;&amp;amp;idlist&amp;amp;i",' ',', ');
			else '' 
			%end ;
	      update _var_attr_compare
           set data_changes=case(memname)
                   %do i = 1 %to &amp;amp;ndata;
                       when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then case (upcase(name))
                           %if &amp;amp;&amp;amp;nvar&amp;amp;i&amp;gt;0 %then %do j = 1 %to &amp;amp;&amp;amp;nvar&amp;amp;i;
                               %if %sysevalf(%superq(any_diff&amp;amp;i._&amp;amp;j)^=,boolean) %then %do;
                                    when upcase("%scan(&amp;amp;&amp;amp;vlist&amp;amp;i,&amp;amp;j,|)") then %superq(any_diff&amp;amp;i._&amp;amp;j)
                               %end;
                           %end;
                           %else %do;
                              when "" then .
                           %end;
                            else . end
                   %end;
					else . end , 
                id_variables=case 
                       when upcase(name) in("" %do j = 1 %to %sysfunc(countw(&amp;amp;id,%str( ))); "%qupcase(%scan(&amp;amp;id,&amp;amp;j,%str( )))" %end;) then 'Yes'
                       else 'No' end;           
   quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791425#M253491</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T13:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791427#M253493</link>
      <description>&lt;P&gt;Turn on the &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1dhqw0i5yj2m8n15opapnwteqra.htm" target="_self"&gt;MPRINT&lt;/A&gt; &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0xmqcv92coq2tn1k0z0q6fl2dew.htm" target="_self"&gt;MLOGIC&lt;/A&gt; &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0lh4tuknkdkf2n1d4qi7utpyf5n.htm" target="_self"&gt;SYMBOLGEN&lt;/A&gt; options&amp;nbsp;&lt;BR /&gt;Then run your code and review the log&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You need to see what the macro compare_all is doing, because there is probably something prior to new_observations=case(memname) that is causing the issue (like a missing semi-colon)&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791427#M253493</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2022-01-21T14:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791438#M253497</link>
      <description>&lt;P&gt;Your macro seems to be trying to generate WHEN clauses in the middle of an SQL UPDATE statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;update _var_obs_compare
  set lost_observations=case(memname)
%do i = 1 %to &amp;amp;ndata;
  when "%scan(&amp;amp;dlist,&amp;amp;i,|)" then &amp;amp;&amp;amp;removed&amp;amp;i;
  else . 
%end ;			 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The WHEN and ELSE keywords in SQL code need to be part of a CASE/END block of code.&lt;/P&gt;
&lt;P&gt;Plus you cannot have the semi-colon after the resolution of &amp;amp;&amp;amp;REMOVED&amp;amp;I as that will end the UPDATE statement.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791438#M253497</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-21T14:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791440#M253499</link>
      <description>&lt;P&gt;After having added the : options symbolgen source mlogic mprint ; Statements the error is now showing up in two (2) places :&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable NDATA resolves to 0&lt;BR /&gt;MLOGIC(COMPARE_ALL): %DO loop beginning; index variable I; start value is 1; stop value is 0; by value is 1 Loop will not be&lt;BR /&gt;executed.&lt;BR /&gt;new_observations=case(memname)&lt;BR /&gt;_______________&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&gt;And also here :&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable J resolves to 13&lt;BR /&gt;MLOGIC(COMPARE_ALL): %DO loop index variable J is now 14; loop will not iterate again.&lt;BR /&gt;MPRINT(COMPARE_ALL): update _var_obs_compare set lost_observations=case(memname) new_observations=case(memname)&lt;BR /&gt;data_changes=case(memname) id_variables=case(memname) update _var_attr_compare set data_changes=case(memname) else . end ,&lt;BR /&gt;id_variables=case when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"&lt;BR /&gt;"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND") then 'Yes' else 'No' end;&lt;BR /&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, GET,&lt;BR /&gt;GT, GTT, LE, LET, LT, LTT, NE, NET, OR, WHEN, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791440#M253499</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T14:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791441#M253500</link>
      <description>&lt;P&gt;Tom,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wanted you to see the Errors in my SAS Log after having added the : OPTIONS SYMBOLGEN SOURCE MLOGIC MPRINT statements; as suggested by the AMSAS User above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable NDATA resolves to 0&lt;BR /&gt;The SAS System 08:30 Friday, January 21, 2022&lt;/P&gt;&lt;P&gt;MLOGIC(COMPARE_ALL): %DO loop beginning; index variable I; start value is 1; stop value is 0; by value is 1. Loop will not be&lt;BR /&gt;executed.&lt;BR /&gt;new_observations=case(memname)&lt;BR /&gt;________________&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&gt;And I also see error here to, in the SAS Log :&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable J resolves to 13&lt;BR /&gt;MLOGIC(COMPARE_ALL): %DO loop index variable J is now 14; loop will not iterate again.&lt;BR /&gt;MPRINT(COMPARE_ALL): update _var_obs_compare set lost_observations=case(memname) new_observations=case(memname)&lt;BR /&gt;data_changes=case(memname) id_variables=case(memname) update _var_attr_compare set data_changes=case(memname) else . end ,&lt;BR /&gt;id_variables=case when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"&lt;BR /&gt;"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND") then 'Yes' else 'No' end;&lt;BR /&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, GET,&lt;BR /&gt;GT, GTT, LE, LET, LT, LTT, NE, NET, OR, WHEN, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791441#M253500</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T14:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791443#M253502</link>
      <description>&lt;P&gt;You need to post the whole log, not just a small section.&lt;BR /&gt;Something is happening before the error that results in the error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example in the log below notice that I'm missing a semi-colon after my set sashelp.class statement, which results in the error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;433  %macro error() ;
434      x=1 ;
435  %mend ;
436
437  data _null_ ;
438      set sashelp.class
439      %error();
NOTE: Line generated by the invoked macro "ERROR".
1         x=1 ;
           -
           22
           76
MPRINT(ERROR):   x=1 ;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;,
              CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_,
              _NULL_.

ERROR 76-322: Syntax error, statement will be ignored.

440  run ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791443#M253502</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2022-01-21T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791451#M253507</link>
      <description>&lt;P&gt;I usually only turn on MLOGIC or SYMBOLGEN as a last resort when debugging a macro. Otherwise the SAS log is too clutter for humans to decipher.&lt;/P&gt;
&lt;P&gt;So your macro generated this statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;update _var_obs_compare
 set lost_observations=case(memname)
  new_observations=case(memname)
  data_changes=case(memname)
  id_variables=case(memname)
 update _var_attr_compare 
 set data_changes=case(memname) 
 else . end 
,
  id_variables=case 
  when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"
"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND") 
  then 'Yes' else 'No' end
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That does not look like valid SQL to me.&lt;/P&gt;
&lt;P&gt;What SQL code were you trying to generate?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791451#M253507</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-21T15:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791457#M253509</link>
      <description>&lt;P&gt;Tom,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you want me to forward just that section of the PROC SQL code/logic; where the Error is occurring ? Or, the entire piece ?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791457#M253509</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T15:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791463#M253510</link>
      <description>&lt;P&gt;I need to know what you trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before you can use macro logic to generate SAS code you need to know what SAS code you will want it to generate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So show what SAS code you need to generate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did the macro code ever work to generate that SAS code?&amp;nbsp; If so then what changed to make it stop working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791463#M253510</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-21T15:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791469#M253514</link>
      <description>&lt;P&gt;Tom,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run this entire program macro program which&amp;nbsp;compares the datasets of two libraries together to check&amp;nbsp;for changes in variables, datasets, and values in datasets the two&amp;nbsp;libraries share. The macro outputs a report of three levels into&amp;nbsp;an Excel file. I have never run this program successfully. I am attaching the entire piece of code/logic in this reply to you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791469#M253514</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T15:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791473#M253517</link>
      <description>Just taking a wild guess here , but after looking at the SAS Log where the Error was occurring and looking at the code/logic above - shouldn't the Statement values have commas between then since this is an "in" statement . id_variables=case&lt;BR /&gt;when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"&lt;BR /&gt;"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND")&lt;BR /&gt;then 'Yes' else 'No' end</description>
      <pubDate>Fri, 21 Jan 2022 16:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791473#M253517</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T16:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791475#M253519</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Just taking a wild guess here , but after looking at the SAS Log where the Error was occurring and looking at the code/logic above - shouldn't the Statement values have commas between then since this is an "in" statement . id_variables=case&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then 'Yes' else 'No' end&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 16:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791475#M253519</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T16:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791476#M253520</link>
      <description>Just taking a wild guess here , but after looking at the SAS Log where the Error was occurring and looking at the code/logic above - shouldn't the Statement values have commas between then since this is an "in" statement . id_variables=case&lt;BR /&gt;when upcase(name) in("" "CORP_ENT_CD" "PROV_ORGZN_ID" "DW_MBR_KEY" "CAP_PMT_TYP_CD" "LST_NM" "FST_NM"&lt;BR /&gt;"HLTH_SYS_CNTRT_ID" "JOB_ID" "PD_CD" "PD_AMT" "BLUCAP_PROD_TYP" "XACTN_SRC_ID" "PRTNR_CLNT_SUPPSN_IND")&lt;BR /&gt;then 'Yes' else 'No' end</description>
      <pubDate>Fri, 21 Jan 2022 16:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791476#M253520</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T16:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791590#M253583</link>
      <description>Tom, I have made numerous adjustments as per your suggestions, but nothing seems to work. Just following up.</description>
      <pubDate>Fri, 21 Jan 2022 20:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791590#M253583</guid>
      <dc:creator>gbougalis</dc:creator>
      <dc:date>2022-01-21T20:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791591#M253584</link>
      <description>The iron rule of macro programming is this:&lt;BR /&gt;Start with WORKING non-macro code that covers one instance.&lt;BR /&gt;Only when you have this can you start to make it dynamic.</description>
      <pubDate>Fri, 21 Jan 2022 20:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791591#M253584</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-21T20:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791599#M253589</link>
      <description>&lt;P&gt;The IN operator does not need commas. Spaces work fine.&lt;/P&gt;
&lt;P&gt;Try it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.class;
 where name in: ('A' 'B') ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jan 2022 21:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791599#M253589</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-21T21:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Macro Program Syntax ERROR:22-322 and ERROR:76-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791601#M253591</link>
      <description>&lt;P&gt;Did someone give you this macro? Did it work for them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the purpose.&lt;/P&gt;
&lt;P&gt;The top seems to be comparing the structure of two sets of datasets by looking at the output of PROC CONTENTS.&lt;/P&gt;
&lt;P&gt;What is the part that is breaking trying to do?&amp;nbsp; The code does not really say why it is doing whatever it is trying to do.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 21:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Macro-Program-Syntax-ERROR-22-322-and-ERROR-76-322/m-p/791601#M253591</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-21T21:54:53Z</dc:date>
    </item>
  </channel>
</rss>

