SIZEKMGw.d Format

Writes a numeric value in the form nKB for kilobytes, nMB for megabytes, or nGB for gigabytes.

Category: Numeric
Alignment: Right

Syntax

SIZEKMGw.[d]

Arguments

w

specifies the width of the output field.

Default 9
Range 2–33

d

specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.

Default 0
Range 0–31

Details

When you specify the SIZEKMGw.d format, SAS determines the best suffix: KB for kilobytes; MB for megabytes; or GB for gigabytes; and divides the SAS numeric value by one of the following values:
KB
1024
MB
1048576
GB
1073741824

Example

Statements
Results
----+----1
select put (3688, sizekmg.);
4KB
select put (1048576, sizekmg.);
1MB
select put (83409922345, sizekmg.);
8GB

See Also

Formats: