Chapter Contents

Previous

Next
PERCENTw.d

PERCENTw.d



Reads percentages as numeric values

Category: Numeric


Syntax
Syntax Description
Details
Examples

Syntax

PERCENTw.d

Syntax Description

w
specifies the width of the input field.
Default: 6
Range: 1-32

d
optionally specifies the power of 10 by which to divide the value. If the data contain decimal points, the d value is ignored.
Range: 0-2


Details

The PERCENTw.d informat converts the numeric portion of the input data to a number using the same method as the COMMAw.d informat. If a percent sign (%) follows the number in the input field, PERCENTw.d divides the number by 100.


Examples

input @1 x percent3. @4 y percent5.; 

Data Lines Results
----+----1----+

1% (20%)
0.01 -0.2


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.