BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
wr
Calcite | Level 5 wr
Calcite | Level 5

Hi SAS community,

 

I directly emailed SAS support, but they said they cannot help and recommended me to post here. I have used SAS University Edition (Mac OS, SAS University Edition 9.4) for several years now and all of a sudden am getting a strange error. This error occurs on programs I have run many times without error. In fact, if I just run a very simple program created from the built-in library I get the same error. I tried reinstalling VirtualBox, re-importing the SAS appliance, different browsers (safari, chrome, Firefox), and even a different computer, but no luck.

 

The error is:
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.

 

I do not have any quotation marks in my code. And I still get there error.  Please see my code below: 

 

*import data;
proc import out= work.BIRC DATAFILE= "/folders/myfolders/2timepoint/BIRC_2timepoint_111018.xlsx"
dbms=xlsx REPLACE;
sheet="all";
getnames=yes;
run;
 
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = sixmonth_GOSe_Score Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = sixmonth_GOSe_Score;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = AttnT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = AttnT;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = MemT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = MemT;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = ExecT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = ExecT;
run;
 
%mend structa;
%structa(Acute_L_Front_ctx_totalvol);
%structa(Acute_R_Front_ctx_totalvol);
%structa(Acute_L_Insula_ctx_totalvol);
%structa(Acute_R_Insula_ctx_totalvol);
%structa(Acute_L_Occip_ctx_totalvol);
%structa(Acute_R_Occip_ctx_totalvol);
%structa(Acute_L_Pari_ctx_totalvol);
%structa(Acute_R_Pari_ctx_totalvol);
%structa(Acute_L_Temp_ctx_totalvol);
%structa(Acute_R_Temp_ctx_totalvol);
%structa(Acute_Cerebellum_totalvol);
%structa(Acute_BrStem_totalvol);
%structa(Acute_L_Caud_totalvol);
%structa(Acute_L_Hipp_totalvol);
%structa(Acute_L_Pall_totalvol);
%structa(Acute_L_Puta_totalvol);
%structa(Acute_L_Thal_totalvol);
%structa(Acute_R_Caud_totalvol);
%structa(Acute_R_Hipp_totalvol);
%structa(Acute_R_Pall_totalvol);
%structa(Acute_R_Puta_totalvol);
%structa(Acute_R_Thal_totalvol);
1 ACCEPTED SOLUTION
4 REPLIES 4
wr
Calcite | Level 5 wr
Calcite | Level 5

Thanks for the quick reply.  That fixed it.

Reeza
Super User

You define a macro with %macro, you call a macro with the %macro_name, not %macro as well. That's likely part of your issue. I would also recommend you modify your macro to take another parameter which is the output data set name. Otherwise if there's an issue with the macro, it will not replace the data set which already exists and will continue on to use that OLD dataset with the PROC GLM code. 

And since you're doing the  GLM for every step, wouldn't it make sense to include that in the macro as well?

 

I suspect your code should be:

%structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = sixmonth_GOSe_Score Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = sixmonth_GOSe_Score;
run;

And without knowing what's in that macro, the statement about quotations is not necessarily true at this point in time. 

 


@wr wrote:

Hi SAS community,

 

I directly emailed SAS support, but they said they cannot help and recommended me to post here. I have used SAS University Edition (Mac OS, SAS University Edition 9.4) for several years now and all of a sudden am getting a strange error. This error occurs on programs I have run many times without error. In fact, if I just run a very simple program created from the built-in library I get the same error. I tried reinstalling VirtualBox, re-importing the SAS appliance, different browsers (safari, chrome, Firefox), and even a different computer, but no luck.

 

The error is:
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.

 

I do not have any quotation marks in my code. And I still get there error.  Please see my code below: 

 

*import data;
proc import out= work.BIRC DATAFILE= "/folders/myfolders/2timepoint/BIRC_2timepoint_111018.xlsx"
dbms=xlsx REPLACE;
sheet="all";
getnames=yes;
run;
 
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = sixmonth_GOSe_Score Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = sixmonth_GOSe_Score;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = AttnT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = AttnT;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = MemT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = MemT;
run;
*acute_only;
%macro structa(sa);
proc glm data = work.BIRC;
class gender_m0_f1;
model &sa = ExecT Acute_normalized_brain_volume postinjury_day_acute_MRI gender_m0_f1 age_at_injury / SS3;
manova h = ExecT;
run;
 
%mend structa;
%structa(Acute_L_Front_ctx_totalvol);
%structa(Acute_R_Front_ctx_totalvol);
%structa(Acute_L_Insula_ctx_totalvol);
%structa(Acute_R_Insula_ctx_totalvol);
%structa(Acute_L_Occip_ctx_totalvol);
%structa(Acute_R_Occip_ctx_totalvol);
%structa(Acute_L_Pari_ctx_totalvol);
%structa(Acute_R_Pari_ctx_totalvol);
%structa(Acute_L_Temp_ctx_totalvol);
%structa(Acute_R_Temp_ctx_totalvol);
%structa(Acute_Cerebellum_totalvol);
%structa(Acute_BrStem_totalvol);
%structa(Acute_L_Caud_totalvol);
%structa(Acute_L_Hipp_totalvol);
%structa(Acute_L_Pall_totalvol);
%structa(Acute_L_Puta_totalvol);
%structa(Acute_L_Thal_totalvol);
%structa(Acute_R_Caud_totalvol);
%structa(Acute_R_Hipp_totalvol);
%structa(Acute_R_Pall_totalvol);
%structa(Acute_R_Puta_totalvol);
%structa(Acute_R_Thal_totalvol);

 

If you're using SAS Studio, sometimes it can get annoying and hit a wall! I literally waited 2 hours and reran the program with this same log note, and it went away (same code) after I took a mini-break from SAS Studio.

 

Just a head's up --- it's not always the coder's fault 😁

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 12911 views
  • 1 like
  • 4 in conversation