Previous Page | Next Page

Informats for NLS

NLPCTIw.d Informat



Reads percentage data in the specified locale for international expressions, and then converts the data to a numeric value.
Category: Numeric

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

NLPCTIw.d


Syntax Description

w

specifies the width of the input field.

Default: 6
Range: 1-32
d

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 NLPCTIw.d informat reads percentage data in the specified locale for international 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 parentheses from the input data.


Comparisons

The NLPCTIw.d informat performs processing that is opposite of the NLPCTw.d informat.


Examples

The following example uses -12,345.67% as the input value.

Statements Results

----+----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

Formats:

NLPCTw.d Format

NLPCTIw.d Format

Informats:

NLPCTw.d Informat

Previous Page | Next Page | Top of Page