|Type:||Macro quoting function|
|Passing Unresolved Macro Variable Values|
The %SUPERQ function returns the value of a macro variable without attempting to resolve any macros or macro variable references in the value. %SUPERQ masks the following special characters and mnemonic operators:
For a description of quoting in SAS macro language, see Macro Quoting.
Note: The maximum level of nesting for the macro quoting functions is 10.
%SUPERQ masks the same characters as the %NRBQUOTE function. However, %SUPERQ does not attempt to resolve anything in the value of a macro variable. %NRBQUOTE attempts to resolve any macro references or macro variable values in the argument before masking the result.
data _null_; call symput('mv1','Smith&Jones'); call symput('mv2','%macro abc;'); run; %let testmv1=%superq(mv1); %let testmv2=%superq(mv2); %put Macro variable TESTMV1 is &testmv1; %put Macro variable TESTMV2 is &testmv2;
You might think of the values of TESTMV1 and TESTMV2 as "pictures" of the original values of MV1 and MV2. The %PUT statement then writes the pictures in its text. The macro processor does not attempt resolution. It does not issue a warning message for the unresolved reference &JONES or an error message for beginning a macro definition inside a %LET statement.