BookmarkSubscribeRSS Feed
maliksmom2000
Obsidian | Level 7

Thank you for the help, I am a little frustrated.  I used the CATX function in EG and the expression is valid.  The output did concatenate the requested columns, trim the front and back spaces and also put in a separator.  However, the output is in a different order than the expression.  What am I doing incorrectly?

 

CATX(t1.DA_NBR, t1.DA_FRAC_NBR, t1.SA_SN_PRE_DRCT_CD, t1.SN_TXT, t1.SA_SN_ST_TY_CD, t1.SA_SN_POST_DRCT_CD, t1.DEST_TY_CD, t1.DEST_TXT, t1.CITY_NM, t1.ST_ABBR_NM, t1.DPA_BSC_ZIP_CD)

 

 

2 REPLIES 2
Astounding
PROC Star

What did you expect as a separator? 

 

In CATX, the first parameter is the separator.  So this is requesting that the value of t1.DA_NBR be used as the separator.  That might be your intention, but it seems unlikely.  Perhaps you need to insert:

 

CATX(' ', t1.DA_NBR.......)

ballardw
Super User

When code goes wrong it often helps to show 1) the actual result from the code and 2) the expected result when you have one.

 

If the result is as @Astounding suggests it would likely show up pretty easily especially when compared to an expected value. In fact it would likely show if only 3 or 4 variables were concatenated.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 4145 views
  • 2 likes
  • 3 in conversation