Functions and CALL Routines |
Category: | Character |
Restriction: | I18N Level 1 |
Syntax | |
Arguments | |
Details | |
Comparisons | |
See Also |
Syntax |
SUBPAD(string, position <, length>) |
is a positive integer that specifies the position of the first character in the substring.
is a non-negative integer that specifies the length of the substring. If you do not specify length, the SUBPAD function returns the substring that extends from the position that you specify to the end of the string.
Details |
In a DATA step, if the SUBPAD function returns a value to a variable that has not previously been assigned a length, then that variable is given a length of 200 bytes.
If the substring that you specify extends beyond the length of the string, the result is padded with blanks.
Comparisons |
The SUBPAD function is similar to the SUBSTR function except for the following differences:
If the value of length in SUBPAD is zero, SUBPAD returns a zero-length string. If the value of length in SUBSTR is zero, SUBSTR
If the substring that you specify extends past the end of the string, SUBPAD pads the result with blanks to yield the length that you requested. If the substring that you specify extends past the end of the string, SUBSTR
See Also |
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.