PIBw.d Format: Windows

Writes values in positive integer-binary (fixed-point) format.

Category: Numeric
Alignment: Left
Windows specifics: native byte-swapped integers
See: PIBw.d

Syntax

PIBw.d

Required Arguments

w

specifies the width of the output field in bytes (not digits).

Default 1
Range 1–18

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.

Range 0–10

Details

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 website.

Example: Processing a Number That Is Too Large to Format

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