The Equivalent Code for CATX(SP, OF X1-X4) is
Reveal answer
Fill a bubble to check yourself
The Equivalent Code for CATX(SP, OF X1-X4) is
X1||SP ||X2||SP||X3||SP||X4
TRIM(X1)||SP||TRIM(X2)||SP||TRIM(X3)||SP||TRIM(X4)
TRIM(LEFT(X1))||TRIM(LEFT(X2))||TRIM(LEFT(X3))||TRIM(LEFT(X4))
TRIM(LEFT(X1))||SP||TRIM(LEFT(X2))||SP||TRIM(LEFT(X3))||SP||TRIM(LEFT(X4))
The CATX function in SAS concatenates character strings, strips leading and trailing blanks from each argument, and inserts a specified delimiter between them. Thus, CATX(SP, OF X1-X4) is equivalent to stripping and left-aligning each variable and inserting the SP delimiter between them.