Writes standard numeric data one digit per byte.
Category: |
Numeric
|
Alignment: |
right
|
Alias: |
Fw.d
|
See: |
w.d Format under z/OS
|
-
w
-
specifies the width of the output field.
Range: |
1-32 |
Tip: |
Allow enough space to write
the value, the decimal point, and a minus sign, if necessary. |
-
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 |
Tip: |
If d
is 0 or you omit d, w.d writes the value without a decimal
point. |
The w.d format rounds to the nearest number that fits in the output
field. If w.d is
too small, SAS might shift the decimal to the BESTw. format. The w.d format writes negative numbers with leading
minus signs.
In addition, w.d
right aligns before writing and pads the output with leading blanks.
The Zw.d format is similar to the
w.d format except that Zw.d pads right-aligned output with 0s instead of
blanks.
put @7 x 6.3;
Value of x |
Results |
|
----+----1----+
|
23.45
|
23.450
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.