COMMAw.d Informat

Removes embedded characters.
Category: Numeric
Alias: DOLLARw.d

Syntax

COMMAw.d

Syntax Description

w
specifies the width of the input field.
Default:1
Range:1–32
d
specifies the power of 10 by which to divide the value. If the data contain decimal points, the d value is ignored. This argument is optional.
Range:0–31

Details

The COMMAw.d informat reads numeric values and removes embedded commas, blanks, dollar signs, percent signs, hyphens, and close parentheses from the input data. The COMMAw.d informat converts an open parenthesis at the beginning of a field to a minus sign.

Comparisons

The COMMAw.d informat operates like the COMMAXw.d informat, but it reverses the roles of the decimal point and the comma. This convention is common in European countries.

Example

input @1 x comma10.;
Data Line
Result
----+----1----+
$1,000,000
1000000
(500)
-500