Thanks for the answer. I have made the modifications suggested, however, I cannot find the solution yet. I am trying to describe the issue properly with attaching the outcome, maybe it helps : 1. I am constructing a loop by defining an array and taking its values from a specific column in the master table. (let's choose 'CA_BC' record as an example) where reporting_period = put(&&period&j, 6.) and product_ccar_type = &&product&k /* distinct values : CA_BC, CA_CC, CA_OC, CO_UI, RE_FR, OTH, RE_HE*/ ;quit; 2. The macro stops with the following message - even if the loop takes 'CA_BC', it cannot find it, however, this value is taken from that very master table: SYMBOLGEN: && resolves to &. SYMBOLGEN: Macro variable K resolves to 1 SYMBOLGEN: Macro variable PRODUCT1 resolves to CA_BC MPRINT(MAXMIN): select count(ACCOUNT_NUMBER), count(distinct ACCOUNT_NUMBER), sum(case when ACCOUNT_NUMBER is null then 1 else 0 end) into :count1, :countd1, :countnull1 from mask.mis_coe_au where reporting_period = put(201812, 6.) and product_ccar_type = CA_BC ; ERROR: The following columns were not found in the contributing tables: CA_BC. 3. If I change the code from product_ccar_type = &&product&k to product_ccar_type = ('CA_BC'), it works.
... View more