You can avoid the use of QUOTING functions in this case with the use of parenthesis(). Notice the change in your code where &SB is used in the macro, I removed the parenthesis because they are now part of the value.
If you had a situation where the parenthiesis were not needed they could be removed with %qsubstr(%superq(sb),2,%length(%superq(sb))-2);
[pre]
433 %let sc = '1224','1612','9603','9919','1920';
434 %let FACTOR = ?; **Where is this?;
435
436 %macro sb_metrics(sb=('9999'), sb_txt_shrt=none,
436! sb_txt_lng=none);
437 %put _LOCAL_;
438 %put , count(distinct case when C.itm_sbrnd_cd in &sb
438! then A.lbi_indv_id else . end)&factor as
438! &sb_txt_shrt._indv_cnt
439 /* more code here but same concept */.
440 &factor as &sb_txt_shrt._indv_cnt
441 ;
442 %mend sb_metrics;
443
444 %sb_metrics(sb=(&sc))
SB_METRICS SB_TXT_SHRT none
SB_METRICS SB_TXT_LNG none
SB_METRICS SB ('1224','1612','9603','9919','1920')
, count(distinct case when C.itm_sbrnd_cd in
('1224','1612','9603','9919','1920') then A.lbi_indv_id else .
end)? as none_indv_cnt . ? as none_indv_cnt
[pre]
... View more