&&var&vv. = strip(put(p*&&multi&vv., &&format&vv.)) || " (" || strip(put(ci_lower*&&multi&vv., &&format&vv.)) || ", " || strip(put(ci_upper*&&multi&vv., &&format&vv.)) || ")";
****************************************************************************************************
****************************************************************************************************
* PROGRAM: t1t2conc_createdata.sas
* Created (mm/dd/yyyy): 05/14/2021
*--------------------------------------------------------------------------------------------------
* PURPOSE: The macro produces tables for a standard Type 1 and Type 2 report
* - For Type 1 requests: agg_t1cida.sas7bdat
* - For Type 2 requests: agg_t2cida.sas7bdat
* - For Type 2 concomitance requests: agg_t1conc.sas7bdat
* - For Type 1 requests aggregation across all data partners: final_t1cida.sas7bdat
* - For Type 2 requests aggregation across all data partners: final_t2cida.sas7bdat
* - For Type 2 concomitance requests: final_t2conc.sas7bdat
* - For Type 1 requests by data partner: final_dps_t1cida.sas7bdat
* - For Type 2 requests by data partner: final_dps_t2cida.sas7bdat
* - For Type 2 concomitance requests by data partner: final_dps_t2conc.sas7bdat
* - for t1: table =t1_cida, grpvar = group
* - for t2: table =t2_cida, grpvar = group
* - for conc: table =t2_conc, grpvar = analysisgrp
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
***************************************************************************************************;
%macro t1t2conc_createdata(table =, grpvar = );
%put =====> MACRO CALLED: t1t2conc_createdata ;
/************************************************************************************************
Determine levels and stratifications
************************************************************************************************/
/* Confirm a table columns file has been specified */
%if %str("&tablecolumnsfile.") = %str("") %then %do;
%put ERROR: (Sentinel) Lookup table includes dataset &tdatasetlist., but tablecolumnsfile is not specified in &createreportfile. file.;
%let &table._stratification =;
/* Determine &table. levels and stratifications to store in macro variables*/
select distinct quote(strip(levelid1))
into :&table._levelid separated by ' '
from tablefile where dataset = "&table.";
select distinct tablesub into: &table._stratification separated by ' '
where tablesub ne 'overall' and dataset = "&table.";