The SAS v9.4 documentation lists an automatic macro variable &sysodsescapechar
which contains the current ODS escape character, assigned using ods escapechar=
.
Whenever I try to view the macro variable using a %put
statement, I get the following error:
ERROR: Open code statement recursion detected.
This happens when open code erroneously causes a macro statement to call another macro statement.
I've tried all of the following:
%put &=sysodsescapechar.;
%put %nrbquote(&sysodsescapechar.);
%put %superq(sysodsescapechar);
They all result in the same error.
When I try to view the macro variable using a data step, it appears to be empty.
data test;
esc = "&sysodsescapechar.";
put esc=;
run;
If the macro variable actually is empty, why do I get open code statement recursion errors? The %put
statement on its own is valid, so putting an empty variable shouldn't be an issue.
Any guidance here would be much appreciated.