02-14-2012 06:00 PM
I want to pass two long strings into a sas macro, like this:
%some_macro(first=this is quite a long string, two=and so is this);
I can define macros where I pass an argument like the first, but if I have two arguments like this it seems SAS gets confused, and I get errors about strings being 262 characters or longer. I suspect I should be using some sort of quoting or something, but I'm not sure exactly what to use. Any ideas?
02-14-2012 07:03 PM
proc freq data=hsurvey2.hsa05_adult_public;
%two(first=this is a long string, second=and so is this);
It turns out that this works fine. The problem in my code is something else entirely. I'll try to track that down.
02-14-2012 06:19 PM
There is a limit on the length of a macro variable. Should be around 32,000.
The error message you report can be suppressed by using the option NOQUOTELENMAX.
You would see it if your macro did something like.