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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 15 replies
  • 1995 views
  • 6 likes
  • 4 in conversation