12-02-2013 03:26 PM
How long is the length of the value that can be put in a macro variable?
Here is my code:
/** Get specific title from the note description dataset **/
proc sql noprint;
select desc_e, desc_f into :T1_EI_TITLE_E, :T1_EI_TITLE_F
where code = "T1_EI_TITLE";
It crashes because the length of both "desc_e" and "desc_f" is too long. Is there a way to make this work?
Thanks a lot in advance :-)
12-02-2013 03:41 PM
The most common setting for maximum length of a macro variable is 65,534 characters. Do you really expect the values you are reading to be anywhere near that long? More likely there is some other cause of the crash. Have you considered reading the data into a SAS data set rather than into macro variables?
12-04-2013 11:22 AM
If there is a "crash" do you mean errors in the log or SAS quits? If there are errors then post them to help diagnose the problems.
The system option MVARSIZE sets the maximum length of macro variables and may default to 4096.
proc options group=macro; run;
to examine macro related settings.
If the lengths of your data set variable do exceed the MVARSIZE then increase the value:
options mvarsize=9000; or sum such to match.
Need further help from the community? Please ask a new question.