Thank you for the help. The &TBL_B_DIAG_SEXW5A_CDWX does resolve to a list of codes because of restrictions, I can only have a list of 1,000 codes to pass to a macro variable, so there is a macro ..SEXW5B, SEXW5C, etc. and each macro variable contains less than the 1,000 of those. This is an example of the issue:
NOTE: Line generated by the macro variable "_VARNME". 1 '630','631.0','631.8','632','633.00','633.01','633.10','633.11','633.20','633.21','633.80','633.81','633.90','633.91','634.00' - 22 - 76
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, (, -, SELECT.
"at the end of your macro requires a list in parentheses. Probably, these parentheses are not contained in &TBL_B_DIAG_SEXW5A_CDWX. (I guess that's why you use %BQUOTE). But %STR(&&_varnme.) won't create them either." Yes, you are absolutely correct about this, so the problem is I'm not sure how else to include the parentheses in the macro variable.
If I don't do %BQUOTE, then the error becomes "more positional parameters than defined".
... View more