CALL CATT Routine
Removes trailing blanks, and returns a concatenated character string.
| Category: | Character |
| Restriction: | This function is not valid on the CAS server. |
| Note: | Argument types for arguments that are updated must match in CALL routines. All argument types must be CHAR, VARCHAR, or NUMERIC. If the argument types do not match, a warning is issued to the log. |
Syntax
Required Argument
result
specifies a character variable.
| Restriction | The CALL CATT routine accepts only a character variable as a valid argument for result. Do not use a constant or a SAS expression because CALL CATT is unable to update these arguments. |
Optional Argument
item
specifies a constant, variable, or expression, either character or numeric. If item is numeric, then its value is converted to a character string using the BESTw. format. In this case, leading blanks are removed and SAS does not write a note to the log.
Details
-
writes a warning message to the log stating that the result was truncated
-
writes a note to the log that shows the location of the function call and lists the argument that caused the truncation, except in SQL or in a WHERE clause
-
sets _ERROR_ to 1 in the DATA step, except in a WHERE clause
Comparisons
|
CALL Routine
|
Equivalent Statement
|
|---|---|
CALL CATS(OF X1-X4); |
X1=TRIM(LEFT(X1))||TRIM(LEFT(X2))||TRIM(LEFT(X3))|| TRIM(LEFT(X4)); |
CALL CATT(OF X1-X4); |
X1=TRIM(X1)||TRIM(X2)||TRIM(X3)||TRIM(X4); |
CALL CATX(SP, OF X1-X4); * |
X1=TRIM(LEFT(X1))||SP||TRIM(LEFT(X2))||SP|| TRIM(LEFT(X3))||SP||TRIM(LEFT(X4)); |
CALL
CATX("+","X"," ", "Z","
"); produces X+Z.
Example
data _null_; length answer $ 36; x='London is t '; y='he Olym '; z='pic site for 2012. '; call catt(answer, x, y, z); put answer; run;
London is the Olympic site for 2012.