SAS Component Language Dictionary |
Returns a right-aligned character value
rstring=RIGHT(string<,length>);
|
-
rstring
-
contains the right-aligned character string.
If rstring already exists, then specifying a
length in the RIGHT function changes the current length of rstring to length. If the length
has not been defined with a DECLARE or LENGTH statement, and if rstring is not a window variable, then the default SCL variable
length is 200 characters.
Type: Character
-
string
-
is the character string to be right-justified.
Type:
Character
-
length
-
is the length in which the character string
is to be right-justified. The default is the maximum length of rstring.
Type:
Numeric
The string is justified by padding with leading spaces.
The default length is the maximum length of rstring
characters.
In order for RIGHT to work properly when rstring is a window variable, set the justification attribute
(JUST) for rstring
to NONE when you define the window variables.
To left-justify a character string, use the LEFT function
when you define the window variable. To center a character string, use
CENTER.
CENTER
LEFT
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.