Functions That Extract Parts of Strings
The functions described in this section can extract parts of strings. When used on the left-hand side of the equal sign, the SUBSTR function can also be used to insert characters into specific positions of an existing string.
Function: SUBSTR
Purpose: To extract part of a string. When the SUBSTR function is used on the left side of the equal sign, it can place specified characters into an existing string.
Syntax: SUBSTR(character-value, start <,length>)
character-value is any SAS character value.
start is the starting position within the string.
length, if specified, is the number of characters to include in the substring. If this argument is omitted, the SUBSTR function will return all the ...
Get SAS Functions by Example, Second Edition, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.