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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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