Functions and CALL Routines |
Left-aligns a character string.
-
argument
-
specifies a character constant, variable,
or expression.
In a DATA step,
if the LEFT function returns a value to a variable that has not previously
been assigned a length, then that variable is given the length of the argument.
LEFT returns an argument with leading blanks moved to
the end of the value. The argument's length does not change.
The LEFT function left-aligns
a character string. You can use the LEFT function in most cases. If an application
can be executed in an ASCII environment, or if the application does not manipulate
character strings, then using the LEFT function rather than the KLEFT function.
SAS Statements |
Results |
|
----+----1----+
|
a=' DUE DATE';
b=left(a);
put b;
|
DUE DATE
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.