PERCENTw.d Format

Writes numeric values as percentages.

Category: Numeric
Alignment: Right
Interaction: When the DECIMALCONV= system option is set to STDIEEE, the output that is written using this format might differ slightly from previous releases. For more information, see DECIMALCONV= System Option in SAS System Options: Reference.

Syntax

PERCENTw.d

Syntax Description

w

specifies the width of the output field.

Default 6
Range 4–32
Tip The width of the output field must account for the percent sign (% ) and parentheses for negative numbers, whether the number is negative or positive.

d

specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.

Range 0–31
Requirement must be less than w

Details

The PERCENTw.d format multiplies values by 100, formats them the same as the BESTw.d format, and adds a percent sign (%) to the end of the formatted value. Negative values are enclosed in parentheses.

Example

put @10 gain percent10.;
Value of x
Result
 
----+----1----+----2
0.1
               10%
1.2
              120%
-0.05
         (      5%)

See Also