Informats for NLS |
Category: | Numeric |
Syntax | |
Syntax Description | |
Details | |
Comparisons | |
Examples | |
See Also |
Syntax |
NLPCTw.d |
specifies the width of the input field.
Default: | 6 |
Range: | 1-32 |
optionally specifies whether to divide the number by 10d. If the data contains decimal separators, the d value is ignored.
Default: | 0 |
Range: | 0-31 |
Details |
The NLPCTw.d informat reads percentage data in the specified locale for local expressions, and then converts the data to a numeric value. It divides the value by 100 and removes any thousands separators, decimal separators, blanks, the percent sign, and the close parenthesis from the input data.
Comparisons |
The NLPCTw.d informat performs processing that is opposite of the NLPCTIw.d informat. The NLPCTw.d informat is similar to the PERCENTw.d informat except that the NLPCTw.d informat is locale-specific.
Examples |
The following example uses -12,345.67% as the input value.
Statements | Result |
---|---|
|
----+----1----+ |
options LOCALE=English_UnitedStates;
x=input('-12,345.67%',nlpct32.2);
y=input('(12,345.67%)',percent32.2);
put x=;
put y=; |
-123.4567
-123.4567 |
See Also |
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.