Question

As is known to all, SAS needs special care to quotation marks inside a sentence.

E.g.

%let quoted="I'd like to";
data temp;
    set temp;
    quoted="&quoted";
run;

error is encounterred when submitting.

In fact I need to copy data to one dataset from another one, in which there are a lot of records containing quotation marks. When assigning, error occurrs and data step stop executing, causing rest of the code to be invalid. So in this case, it's impossible to modify original data set by adding duplicated quotation marks, which doesn't make sense.

So instead of having to add a duplicated one, like, "I''d like to", is there any other way of avoiding the error, or making data step keeping executing?

Thanks,

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top