%macro create_hacflags();
%macro temp; %mend temp;
data &output.;
	set &input.;

	&HAC_PREFIX.c01_flag = min(1,sum(of &HAC_PREFIX.c01:));
	&HAC_PREFIX.c02_flag = min(1,sum(of &HAC_PREFIX.c02:));
	&HAC_PREFIX.c03_flag = min(1,sum(of &HAC_PREFIX.c03:));
	&HAC_PREFIX.c04_flag = min(1,sum(of &HAC_PREFIX.c04:));
	&HAC_PREFIX.c05_flag = min(1,sum(of &HAC_PREFIX.c05:));
	&HAC_PREFIX.c06_flag = min(1,sum(of &HAC_PREFIX.c06:));
	&HAC_PREFIX.c07_flag = min(1,sum(of &HAC_PREFIX.c07:));
	&HAC_PREFIX.c08_flag = min(1,sum(of &HAC_PREFIX.c08:));
	&HAC_PREFIX.c09_flag = min(1,sum(of &HAC_PREFIX.c09:));
	&HAC_PREFIX.c10_flag = min(1,sum(of &HAC_PREFIX.c10:));
	&HAC_PREFIX.c11_flag = min(1,sum(of &HAC_PREFIX.c11:));
	&HAC_PREFIX.c12_flag = min(1,sum(of &HAC_PREFIX.c12:));
	&HAC_PREFIX.c13_flag = min(1,sum(of &HAC_PREFIX.c13:));
	&HAC_PREFIX.c14_flag = min(1,sum(of &HAC_PREFIX.c14:));
	&HAC_PREFIX.c15_flag = min(1,sum(of &HAC_PREFIX.c15:));
	&HAC_PREFIX.c16_flag = min(1,sum(of &HAC_PREFIX.c16:));
	&HAC_PREFIX.c15p02_flag = min(1,&HAC_PREFIX.c15p02);

	&HAC_PREFIX._flag = min(1,sum(of &HAC_PREFIX.c:));

run;
%mend create_hacflags;

%create_hacflags;
