<?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 macro question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488041#M287334</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226897"&gt;@hoswee&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I copy/pasted the code you've posted into Notepad++&amp;nbsp;Here what I found:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 474px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22585i9B16E73095C40176/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&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="Capture.JPG" style="width: 117px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22586i2EA1A9D27221631E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Aug 2018 02:55:25 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-08-19T02:55:25Z</dc:date>
    <item>
      <title>SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487855#M287329</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this SAS code, its&amp;nbsp; a bit long but its a very simple code. I dont&amp;nbsp;know what the error is here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please figure out what this error means and how to resolve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. This&amp;nbsp;is the&amp;nbsp;log.&lt;/P&gt;&lt;DIV class="sasSource"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MPRINT(DEMO): proc sql ;
NOTE: Line generated by the invoked macro "DEMO".
229 select 38 as a, "Black or African American" as col, N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as
229 ! Percent from derived._02a_folfiri_demo where new_race='Black or African American' union all select 39 as a, "White" as
____
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, GROUP, GT, GTT, HAVING, LE, LET, LT, LTT, NE, NET, OR, ORDER, ^=, |, ||, ~=.
&amp;nbsp;
ERROR 76-322: Syntax error, statement will be ignore&lt;/CODE&gt;&lt;/PRE&gt;This is the code;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro demo;
	
	proc sql;
		select N(distinct PatientID) into:denom 
		from derived._02a_folfiri_demo ;
	quit;
	
	proc means data=derived._02a_folfiri_demo mean STD median Q1 Q3 min max;
		var age height weight bmi cci_score neutrophil lymphocyte NLR bilrubin;
		output out= stat_sum mean()= STD()= median()= Q1()= Q3()= Min()= Max()=/autoname; 
	run; 

	&amp;#8;
	proc sql ;
		create table _03_demo_folfiri as
		select 1 as a, "Total Cohort" as col, 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID  				union all 
		select 2 as a, "Index_Age" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all  
		select 3 as a, "18-44" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where age_grp ='18-44' 			union all
		select 4 as a, "45-64" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where age_grp ='45-64' 			union all
		select 5 as a, "65-74" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where age_grp ='65-74' 			union all
		select 6 as a, "75 and older" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where age_grp ='75 and older' 			union all
		select 7 as a, "Age sum" as col, 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID  				union all 
		select 8 as a, "Mean[SD]" as col, 			age_Mean as pt_num, 				    age_StdDev as Percent from stat_sum  								union all 
		select 9 as a, "Median" as col, 			age_Median as pt_num 							  from stat_sum  								union all 
		select 10 as a, "Q1-Q3" as col, 			age_Q1 as pt_num, 					age_Q3 as Percent from stat_sum 								union all 
		select 11 as a, "Height" as col, 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 			        union all                                                          
		select 12 as a, "Mean[SD]" as col, 			height_Mean  as pt_num,				 height_StdDev as Percent from stat_sum                                                          	union all 
		select 13 as a, "Median" as col,	                height_Median as pt_num							  from stat_sum        								union all 
		select 14 as a,  "Q1-Q3" as col, 			height_Q1 as pt_num , 				     height_Q3 as Percent from stat_sum                                                          	union all 
		select 15 as a, "min-max" as col,                       height_Min as pt_num ,				    height_Max as Percent from stat_sum									union all 
		select 16 as a, "Weight" as col,                        N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID                            union all
		select 17 as a, "Mean[SD]" as col,			weight_Mean as pt_num, 				 weight_StdDev as Percent from stat_sum                                                          	union all 
		select 18 as a, "Median" as col,                        weight_Median as pt_num							  from stat_sum									union all 
		select 19 as a, "Q1-Q3" as col,                         weight_Q1 as pt_num, 				     weight_Q3 as Percent from stat_sum                                                          	union all
		select 20 as a, "min-max" as col,                       weight_Min as pt_num , 				    weight_Max as Percent from stat_sum									union all 
		select 21 as a, "BMI" as col,                           N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID                            union all
		select 22 as a, "Mean[SD]" as col,			bmi_Mean as pt_num, 				    bmi_StdDev as Percent from stat_sum                                                          	union all 
		select 23 as a, "Median" as col,                        bmi_Median as pt_num							  from stat_sum									union all 
		select 24 as a, "Q1-Q3" as col,                         bmi_Q1 as pt_num, 					bmi_Q3 as Percent from stat_sum                                                          	union all
		select 25 as a, "min-max" as col,                       bmi_Min as pt_num , 				       bmi_Max as Percent from stat_sum									union all 
		select 26 as a, "Sex" as col,				N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 27 as a, "Male" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_gender='Male' 			union all
		select 28 as a, "Female" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_gender='Female' 			union all
		select 29 as a, "Unknown" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_gender='Unknown' 			union all
		select 30 as a, "Tumor location" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 31 as a, "Head" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PrimarySite='Head' 			union all
		select 32 as a, "Body" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PrimarySite='Body' 			union all
		select 33 as a, "Tail" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PrimarySite='Tail' 			union all
		select 34 as a, "Overlapping" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PrimarySite='Overlapping sites'  	union all
		select 35 as a, "Pancreas NOS" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PrimarySite='Pancreas, NOS' 		union all
		select 36 as a, "Race" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 37 as a, "Asian" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_race='Asian' 			union all
		select 38 as a, "Black or African American" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_&amp;#7;race='Black or African American'	union all
		select 39 as a, "White" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_race='White' 			union all
		select 40 as a, "Other Race" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_race='Other Race' 			union all
		select 41 as a, "Null" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_race='Null' 				union all
		select 42 as a, "Ethnicity" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 43 as a, "Hispanic or Latino" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_ethnicity ='Hispanic or Latino' 	union all
		select 44 as a, "Null" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_ethnicity ='Null' 			union all
		select 45 as a, "Geographic location" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 46 as a, "Northeast" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_state='Northeast' 			union all
		select 47 as a, "Midwest" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_state='Midwest' 			union all
		select 48 as a, "South" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_state='South' 			union all
		select 49 as a, "West" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_state='West' 			union all
		select 50 as a, "Unknown" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where new_state='Unknown' 			union all
		select 51 as a, "Smoking Status" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 52 as a, "History of smoking" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where SmokingStatus='History of smoking' 	union all
		select 53 as a, "Unknown/Not documented" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where SmokingStatus='Unknown/not documented'   union all
		select 54 as a, "No History of smoking" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where SmokingStatus='No history of smoking' 	union all
		select 55 as a, "Insurance(Multiple)" as col,		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where not PatientID 				union all
		select 56 as a, "Medicare" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02b_folfiri_ins  where insurance='Medicare'			union all
		select 57 as a, "Medicaid" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Medicaid'			union all
		select 58 as a, "Commercial health plan" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Commercial Health Plan'	union all
		select 59 as a, "Other Government Health Plan" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Other Government Program'	union all
		select 60 as a, "Self pay" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Medicare'			union all
		select 61 as a, "Patient Assistance Program" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Patient Assistance Program'	union all
		select 62 as a, "Workers Compensation" as col,		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Workers Compensation' 	union all
		select 63 as a, "Other Payer-Type Unknown" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Other Payer - Type Unknown'	union all
		select 64 as a, "Unknown/Missing" as col,		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_ins  where insurance='Unknown/Missing'		union all
		select 65 as a, "ECOG_score" as col,			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 66 as a, "0" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue=0 				union all
		select 67 as a, "1" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue=1 				union all
		select 68 as a, "2" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue=2 				union all
		select 69 as a, "3" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue=3 				union all
		select 70 as a, "4" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue=4 				union all
		select 71 as a, "Missing" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where Ecogvalue= . 				union all
		select 72 as a, "Charlson Comobidity Index" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID				union all
		select 73 as a, "0/Unknown" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where cci_score=0 				union all
		select 74 as a, "1" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where cci_score=1				union all
		select 75 as a, "2" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where cci_score=2  				union all
		select 76 as a, "3" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where cci_score=3  				union all
		select 77 as a, "4+" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where cci_score gt 4  				union all
		select 78 as a, "CCI index(sum)" as col,		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 79 as a, "Mean[SD]" as col,	 		cci_score_Mean as pt_num, 		      cci_score_StdDev as Percent from stat_sum 								union all
		select 80 as a, "Median" as col,	 		cci_score_Median as pt_num  						  from stat_sum   								union all
		select 81 as a, "qi-q3" as col,	 			cci_score_Q1 as pt_num,				  cci_score_Q3 as Percent from stat_sum 								union all
		select 82 as a, "min-max" as col,	 		cci_score_Min as pt_num, 			 cci_score_Max as Percent from stat_sum									union all
		select 83 as a, "Albumin" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 84 as a, "&amp;lt;40 g/L" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where alb_cat='&amp;lt;40g/L' 			union all
		select 85 as a, "&amp;gt;=40 g/L" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where alb_cat='&amp;gt;=40g/L' 			union all
		select 86 as a, "Unknown" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where alb_cat='Unknown' 			union all
		select 87 as a, "Neutrophil count (sum)" as col,	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 88 as a, "Mean[SD]" as col,	 		neutrophil_Mean as pt_num, 		     neutrophil_StdDev as Percent from stat_sum 								union all
		select 89 as a, "Median" as col,	 		neutrophil_Median 							  from stat_sum  								union all
		select 90 as a, "q1-q3" as col,	 			neutrophil_Q1 as pt_num, 			 neutrophil_Q3 as Percent from stat_sum 								union all
		select 91 as a, "min-max" as col,	 		neutrophil_Min as pt_num, 			neutrophil_Max as Percent from stat_sum									union all
		select 92 as a, "Lymphocyte(sum)" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demowhere not PatientID  				union all
		select 93 as a, "Mean[SD]" as col,	 		lymphocyte_Mean as pt_num, 		     lymphocyte_Stddev as Percent from stat_sum  								union all
		select 94 as a, "Median" as col,	 		lymphocyte_Median as pt_num 						  from stat_sum  								union all
		select 95 as a, "q1-q3" as col,	 			lymphocyte_Q1 as pt_num,			 lymphocyte_Q3 as Percent from stat_sum 								union all
		select 96 as a, "min-max" as col,	 		lymphocyte_Min as pt_num, 			lymphocyte_mMx as Percent from stat_sum  								union all
		select 97 as a, "NLR(sum)" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 98 as a, "Mean[SD]" as col,	 		NLR_Mean as pt_num, 				    NLR_Stddev as Percent from stat_sum 								union all
		select 99 as a, "Median" as col,	 		NLR_Median as pt_num 							  from stat_sum  								union all
		select 100 as a, "q1-q3" as col,	 			NLR_q1 as pt_num, 				NLR_q3 as Percent from stat_sum 								union all
		select 101 as a, "min-max" as col,	 		NLR_min as pt_num,				       NLR_max as Percent from stat_sum 								union all
		select 102 as a, "Bilrubin" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 103 as a, "Mean[SD]" as col,	 		bilrubin_Mean as pt_num, 		       bilrubin_Stddev as Percent from stat_sum 		  						union all
		select 104 as a, "Median" as col,	 		bilrubin_Median as pt_num 						  from stat_sum 		 						union all
		select 105 as a, "q1-q3" as col,	 		bilrubin_Q1 as pt_num, 			   	  bilrubin_Q3 as Percent  from stat_sum 	 							union all
		select 106 as a, "min-max" as col,	 		bilrubin_Min as pt_num, 			  bilrubin_Max as Percent from stat_sum 								union all
		select 107 as a, "Practice Type" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID 				union all
		select 108 as a, "Academic" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PracticeType='ACADEMIC' 			union all
		select 109 as a, "Community" as col,	 		N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where PracticeType='COMMUNITY'		union all
		select 110 as a, "Line Number at index" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID				union all
		select 111 as a, "1" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where line_index=1				union all
		select 112 as a, "2" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where line_index=2				union all
		select 113 as a, "3" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where line_index=3				union all
		select 114 as a, "4+" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where line_index gt 4				union all
		select 115 as a, "Use of growth factor" as col,	 	N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where not PatientID				union all
		select 116 as a, "No" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where growth_factor='No'			union all
		select 117 as a, "Yes" as col,	 			N(distinct PatientID) as pt_num, N(distinct PatientID)/&amp;amp;denom. as Percent from derived._02a_folfiri_demo where growth_factor='Yes'
		;
	quit; 
		
%mend demo;
%demo;





&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 17:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487855#M287329</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-08-17T17:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487869#M287330</link>
      <description>&lt;PRE class=" language-sas"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;select&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;38&lt;/SPAN&gt; as a&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"Black or African American"&lt;/SPAN&gt; as col&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;	&lt;SPAN class="token function"&gt;N&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;distinct&lt;/SPAN&gt; PatientID&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; as pt_num&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;N&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;distinct&lt;/SPAN&gt; PatientID&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;denom&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; as Percent &lt;SPAN class="token keyword"&gt;from&lt;/SPAN&gt; derived&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;_02a_folfiri_demo &lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; &lt;FONT size="6"&gt;&lt;STRONG&gt;new_&amp;#7;race&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Black or African American'&lt;/SPAN&gt;	union all
		&lt;SPAN class="token statement"&gt;select&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;39&lt;/SPAN&gt; as a&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"White"&lt;/SPAN&gt; as col&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;	 			&lt;SPAN class="token function"&gt;N&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;distinct&lt;/SPAN&gt; PatientID&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; as pt_num&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;N&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;distinct&lt;/SPAN&gt; PatientID&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;denom&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; as Percent &lt;SPAN class="token keyword"&gt;from&lt;/SPAN&gt; derived&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;_02a_folfiri_demo &lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt; new_race&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'White'&lt;/SPAN&gt; 			union all&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It looks like you have an unreadable special character in line 38 "new_race". Try deleting it from your macro code.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 18:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487869#M287330</guid>
      <dc:creator>hoswee</dc:creator>
      <dc:date>2018-08-17T18:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487871#M287331</link>
      <description>&lt;P&gt;But I dont&amp;nbsp;have any special unreadabel&amp;nbsp;character?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 18:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487871#M287331</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-08-17T18:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487947#M287332</link>
      <description>&lt;P&gt;Same old, same old:&lt;/P&gt;
&lt;P&gt;Get working code&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; you wrap it in a macro definition.&lt;/P&gt;
&lt;P&gt;BTW the macro as such solves NO purpose at all, you don't have macro code or use a mscro parameter. The macro only obfuscates your code and makes your log less readable. Remove it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 20:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487947#M287332</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-17T20:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487956#M287333</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208127"&gt;@manya92&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;But I dont&amp;nbsp;have any special unreadabel&amp;nbsp;character?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It might just be invisible to you. Try retyping that line of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise perhaps something else in your process is causing the strange character.&lt;/P&gt;
&lt;P&gt;Are you using SAS/Connect to remote submit this macro definition?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 21:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/487956#M287333</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-08-17T21:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488041#M287334</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226897"&gt;@hoswee&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I copy/pasted the code you've posted into Notepad++&amp;nbsp;Here what I found:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 474px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22585i9B16E73095C40176/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&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="Capture.JPG" style="width: 117px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22586i2EA1A9D27221631E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 02:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488041#M287334</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-08-19T02:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488683#M287335</link>
      <description>I havent copied my entire code, I have a macro parameter, because i need to run the same code for another dataset. I will have to copy the entire code again for it. Thats why I used MACRO. And also i ran my program befroe i used MACROS&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488683#M287335</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-08-21T19:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488690#M287336</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208127"&gt;@manya92&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I havent copied my entire code, I have a macro parameter, because i need to run the same code for another dataset. I will have to copy the entire code again for it. Thats why I used MACRO. And also i ran my program befroe i used MACROS&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Obviously not, or you would have caught the invalid character earlier and not suspected the macro.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-question/m-p/488690#M287336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-21T19:21:45Z</dc:date>
    </item>
  </channel>
</rss>

