BookmarkSubscribeRSS Feed
brm
Calcite | Level 5 brm
Calcite | Level 5
I'm trying to store all distinct records in a macro variable.

Proc sql noprint ;
select distinct DRC_CASE_ID into : tempids separated by ',' from c;
quit;

Getting below error,how can i do it using sas

15 Proc sql;
16 select distinct DRC_CASE_ID into : tempids separated by ',' from c;
ERROR: The length of the value of the macro variable TEMPIDS (79271) exceeds the maximum length
(65534). The value has been truncated to 65534 characters.
17 quit;
1 REPLY 1
Patrick
Opal | Level 21
Hi

You hit the maximum storage capacity of macro variables in a 64bit environment.

You will have to use another technique to achieve what you're after (i.e. a join or a hash look-up).

HTH
Patrick

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 1014 views
  • 0 likes
  • 2 in conversation