sas - %bquote doesn't mask unpaired bracket -
according %bquote() macro function documentation don't have mark unpaired "(" % assign macro variable.
but code doesn't work reason (variable var blank result):
%let var=%bquote((); %put &var;
why? how can fix code produce expected result?
you're confusing masking @ execution time masking @ compile time.
%bquote
masks special characters at execution time:
the %bquote function treats parentheses , quotation marks produced resolving macro variable references or macro calls special characters masked @ execution time. (it not mask parentheses or quotation marks in argument @ compile time.)
to mask @ compile time, must since assigning value in %let
, must use %str
, does require parenthesis preceded %
.
%let var=%str(%(); %put &var;
Comments
Post a Comment