BookmarkSubscribeRSS Feed
newbie_ari
Fluorite | Level 6

Hi,

I'm getting this following error:

ERROR: The text expression length (65538) exceeds maximum length (65534). The text expression has been truncated to 65534

characters.

Is there any way to exceed this limitations?

Regards,

Newbie

6 REPLIES 6
Jagadishkatam
Amethyst | Level 16

Hi

could you show us the code you have used and it resulted in this error.

Thanks,

Jagadish

Thanks,
Jag
newbie_ari
Fluorite | Level 6

Hi Jagadish,

Thanks for your reply. It's unfortunate that I can't share my code. That's why I put that brief question. We are actually running models & pass variables through a macro. Now this macro's length is becoming greater than 65534. The modelling code is pretty complicated. So, it's pretty cumbersome to create 2 or more parts of the variables. So, I was wondering if SAS has some option where I can relax the length limit.

Regards

Jagadishkatam
Amethyst | Level 16

Hi,

as per my understanding that error happens when you have missed to place a semicolon at the end of the value within a macro variable like example

%let string=abc

and if you have used %str() without any blank space within the (). it should be changed to %str( ). give atleast a single space within the ( ).

Hope this helps you.

Thanks,

Jagadish

Thanks,
Jag
kuridisanjeev
Quartz | Level 8

Hi..

I don't think there is a option available to increase macro variable length.You may need to work out on your code to divide your macro variable into two parts.

Go through bellow link for more info..

Thanks&Regards.

Sanjeev.K

newbie_ari
Fluorite | Level 6

Thanks Sanjeev! I was just bit optimistic...in case! I'll update the code to have multiple macro options.

claudiajc
Obsidian | Level 7

I came here with the same isue. One of the existing answers suggested I should review carefully my code again. I found a missing closing parenthesis was causing the error. The missing parenthesis made the code look something like this:

 

%macro a (var1,var2;

 

 

The right code should have been: 

 

%macro a (var1,var2);

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 12629 views
  • 0 likes
  • 4 in conversation