29%macro irmst_riskagg_corr_mat_check( ds_in_corr_mat=
36 select distinct SCENARIO_ID into :_scenario_ids_ separated by
" "
37 from &ds_in_corr_mat.;
38 select distinct _TYPE_ into :_corrtypes_ separated by
" "
39 from &ds_in_corr_mat.;
44 %
if %sysfunc(countw(&_scenario_ids_.,%str( ))) ne 2 %then %do;
45 %put ERROR: the correlation matrix must be specified for 2 scenarios. The attempted specification is for %sysfunc(countw(&_scenario_ids_.,%str( ))) scenario/s;
46 %put ERROR: This error affects the correlation table associated with key &corr_mat_key..;
51 %do i_scenario_ids=1 %to %sysfunc(countw(&_scenario_ids_.,%str( )));
52 %if ((%upcase(%scan(&_scenario_ids_.,&i_scenario_ids.,%str( ))) ne BASECASE) and (%upcase(%scan(&_scenario_ids_.,&i_scenario_ids.,%str( ))) ne ADVERSE)) %then %do;
53 %put ERROR: the correlation matrix must be specified only for 2 scenarios: Basecase and Adverse. The attempted specification is for the %scan(&_scenario_ids_.,&i_scenario_ids.,%str( )) scenario;
54 %put ERROR: This error affects the correlation table associated with key &corr_mat_key..;
60 %if %sysfunc(countw(&_corrtypes_.,%str( ))) ne 1 %then %do;
61 %put ERROR: the correlation matrix _TYPE_ must be unique. The attempted specification is for %sysfunc(countw(&_corrtypes_.,%str( ))) types;
62 %put ERROR: This error affects the correlation table associated with key &corr_mat_key..;
67 %if (%upcase(&_corrtypes_.) ne CORR) %then %do;
68 %put ERROR: the correlation matrix _TYPE_ must be: corr;
69 %put ERROR: This error affects the correlation table associated with key &corr_mat_key..;