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

Hi, Haikuo!

no, you aren't late, you're just in time.

Patric's approach works fine with limited number of additional fields in tables, cats function has limit of length of 200 bytes.

Log, trying to put additional fields under keep:

WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks.

WARNING: In a call to the CATS function, the buffer allocated for the result was not long enough to contain the concatenation of all the arguments. The correct result would contain 394 characters, but the actual result might either be truncated to 200 character(s) or be completely blank, depending on the calling environment. The following note indicates the left-most argument that caused truncation.

Notwithstanding that’s strange, ‘cause

„The value that is returned from the CATS function has the following length:

  • up to 32767 characters in the DATA step except in WHERE clauses

So, your approach, Haikuo fits best for me!

Thank you!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 15 replies
  • 3979 views
  • 6 likes
  • 4 in conversation