The LEFT() function returns the leading part of a string.
The LEFT() function returns the leftmost length characters from the given string. If length is greater than the number of characters in the string, the entire string is returned.
This function is identical in effect to use of the substring assignment operator. Thus the following two statements are equivalent:
SUBSTR = LEFT(VAR, length)
SUBSTR = VAR[1, length]
A = "ABCDEFGHIJK"
S = LEFT(A, 3)
This program fragment assigns the string "ABC" to variable S.