DATA Step, Macro, Functions and more

Error due to Exceeding Length

Reply
Occasional Contributor
Posts: 13

Error due to Exceeding Length

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

Trusted Advisor
Posts: 1,131

Re: Error due to Exceeding Length

Hi

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

Thanks,

Jagadish

Thanks,
Jag
Occasional Contributor
Posts: 13

Re: Error due to Exceeding Length

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

Trusted Advisor
Posts: 1,131

Re: Error due to Exceeding Length

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
Super Contributor
Posts: 276

Re: Error due to Exceeding Length

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

Occasional Contributor
Posts: 13

Re: Error due to Exceeding Length

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

Occasional Contributor
Posts: 7

Re: Error due to Exceeding Length

[ Edited ]

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);

 

Ask a Question
Discussion stats
  • 6 replies
  • 3034 views
  • 0 likes
  • 4 in conversation