Your macro allows these inputs:
%macro counts
(code=
,code_count=
,age_code=
,date_code=
,label1=
,label2=
);
In the call you provide values for the first 4 parameters, but then you try to pass a positional value after the named parameters. Your macro does not accept any positional parameter, and if it did you would need to supply them BEFORE any parameters you pass by name.
You are also missing the closing right parenthesis to end the macro call since the one you have will be used to close the left parenthesis that you have at the start of the last parameter.
%counts
(code=cd9
,code_count=cd9_count
,age_code=cd9_age_first
,date_code=cd9_date_first
, (label1='CD Code for ICD-9' , label2='Number of Crohns encounters in ICD-9',label3='Age of first CD diagnosis in ICD-9' , Label4='Date of first CD diagnosis in ICD-9' );
... View more