Chapter Contents

Previous

Next
w.d

w.d



Reads standard numeric data

Numeric
Width range: 1- 32
Decimal range: 0- 31, d < w.
CMS specifics: minimum and maximum values


Syntax
Details
See Also

Syntax

w.d

w
specifies the field width of the input value in bytes or character digits.

d
specifies the number of digits to the right of the decimal point in the input value.


Details

Numbers are interpreted using the EBCDIC character-encoding system, with one digit per byte. The w.d informat reads numeric values located anywhere in the field. Blanks can precede or follow a numeric value with no effect. A minus sign with no separating blanks must immediately precede a negative value. Data can be stored with decimal points or in scientific notation.

Include a d value in the w.d informat when you want SAS to insert a decimal point. When you include a d value, values read without decimal points are divided by 10d. If the value read already has a decimal point, the d is ignored.

The range of acceptable values that can be read with the w.d informat can range from 5.398E-79 to 7.237E+75. The following table illustrates the use of the w.d informat.

Data Pattern Read Actual Numeric Value Informat Resulting Numeric Value
'F1F2F3F4'x 1234 4. 1234
'40F1F2F3F4'x 1234 5. 1234
'F1F24BF5F0'x 12.50 5. 12.50
'F1F24BF5F0'x 12.50 5.1 12.50
'F1F2F5F040'x 1250 5.1 125
'40F1F0F0F0'x 1000 5.1 100
'4060F1F2F3F4'x -1234 6. -1234
'40F14BF0C54EF0F3'x 1.0E+03 8. 1000

Note:   

  [cautionend]

See Also


Chapter Contents

Previous

Next

Top of Page

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