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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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