dear all: I want to write the macro variable a into datasets ,the code is :
*here a is a weird string,below is a example;
%let a="hello","world!";
data test;
x="'"||%nrstr(&a.)||"'";
run;
but this is failed ,the log shows :
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, arrayname, (, +, -, INPUT, NOT, PUT, ^, _NEW_, ~.
ERROR 200-322: The symbol is not recognized and will be ignored.
the expected result is :
data test_want;
x_want='"hello","world!"';
run;
How can I make the code work? OR a better way to write the weird string to dataset?
Thanks in advance!
... View more