NLMNYw.d Format

Writes the monetary format of the local expression in the specified locale using local currency.
Category: Numeric
Alignment: left

Syntax

NLMNYw.d

Syntax Description

w
specifies the width of the output field.
Default:9
Range:1–32
d
specifies the number of digits to the right of the decimal point in the numeric value.
Default:0
Range:0–31

Details

The NLMNYw.d format reads integer binary (fixed-point) values, including negative values that are represented in two's-complement notation. The NLMNYw.d format writes numeric values by using the currency symbol, the thousands separator, and the decimal separator that is used by the locale.
Note: The NLMNYw.d format does not convert currency format, therefore, the value of the formatted number should equal the currency of the current locale value.

Comparisons

The NLMNYw.d and NLMNYIw.d formats write the monetary format with locale-dependent thousands and decimal separators. However, the NLMNYIw.d format uses three-letter international currency codes, such as USD, while NLMNYw.d format uses local currency symbols, such as $.
The NLMNYw.d format is similar to the DOLLARw.d format except that the NLMNYw.d format is locale-specific.

Example

In the following example, the LOCALE= system option is set to English_UnitedStates.
x=put(-1234.56789,nlmny32.2);
y=put(-1234.56789,dollar32.2);
Statements
Results
----+----1----+
put x=;
put y=;
($1,234.57) 
$-1,234.57