SAS Formats under Windows |
Writes values in positive integer-binary (fixed-point)
format.
Category |
numeric
|
Width range: |
1-8
|
Default width: |
1
|
Decimal range: |
0-10
|
Alignment: |
left
|
Windows specifics: |
native byte-swapped integers
|
See: |
PIBw.d in
SAS Language Reference: Dictionary
|
-
w
-
specifies the width of the output field
in bytes (not digits).
-
d
-
specifies a scaling factor. When you specify
a d value, the PIBw.d format multiplies the number by 10d,
and then applies the positive integer binary format to that value.
The PIBw.d format converts a fixed-point value to an integer
binary
value. If the fixed-point value is negative, the PIBw.d format writes the integer representation for
-1.
For more information about microcomputer fixed-point
values, see the Intel developer Web site.
When a numeric value is too large to format, the result
is the largest integer value that can be stored in four bytes, which is 2,147,483,647.
In the following code
data a;
x = 9999999999999999999;
y = put(x, PIB8.);
put y = hex16.;
run;
SAS returns the hexadecimal representation of 2147483647
y=0000E8890423C78A
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.