Dictionary


HEX w . Format

Converts real binary (floating-point) numbers to hexadecimal representation

Category: Numeric

Width range: 1to16

Default width: 8

Alignment: left

UNIX specifics: floating-point representation

See: HEXw. format in SAS Language Reference: Dictionary

Details

The HEX w. format converts a real (floating-point) binary number to its hexadecimal representation. When you specify a width value of 1 through 15, the real binary number is truncated to a fixed-point integer before being converted to hex. When you specify 16 for the width, SAS writes the floating-point value of the number but does not truncate it.

Note  

UNIX systems vary widely in their floating-point representation. See "Reading and Writing Binary Data in UNIX Environments" on page 198 for more information.

$HEX w . Format

Converts character values to hexadecimal representation

Category: Character

Width range: 1 to 32767

Default width: 4

Alignment: left

UNIX specifics: produces ASCII codes

See: $HEXw. format in SAS Language Reference: Dictionary

Details

Under UNIX, the $HEX w. format produces hexadecimal representations of ASCII codes for characters , with each byte requiring two columns. Therefore, you need twice as many columns to output a value with the $HEX w. format.

IB w . d Format

Writes integer binary values

Category: Numeric

Width range: 1to8

Default width: 4

Decimal Range: 0 “10

Alignment: left

UNIX specifics: byte order

See: IBw.d format in SAS Language Reference: Dictionary

Details

The IB w.d format writes integer binary (fixed-point) values. Integers are stored in integer-binary, or fixed-point, form. For example, the number 2 is stored as 00000002. If the format includes a d value, the data value is multiplied by 10 d .

For more details, see "Reading and Writing Binary Data in UNIX Environments" on page 198.

PD w . d Format

Writes packed decimal data

Category: Numeric

Width range: 1to16

Default width: 1

Decimal Range: 0 “31

Alignment: left

UNIX specifics: data representation

See: PDw.d format in SAS Language Reference: Dictionary

Details

The PD w.d format writes values in packed decimal format. In packed decimal data, each byte contains two digits. The w value represents the number of bytes, not the number of digits. The value's sign is the first byte. Because the entire first byte is used for the sign, you should specify at least a width of 2.

For more details, see "Reading and Writing Binary Data in UNIX Environments" on page 198.

PIB w . d Format

Writes positive integer binary values

Category: Numeric

Width range: 1 to 8

Default width: 1

Decimal Range: 0 “10

Alignment: left

UNIX specifics: byte order

See: PIBw.d format in SAS Language Reference: Dictionary

Details

The PIB w.d format writes fixed-point binary values, treating all values as positive. Thus, the high-order bit is part of the value, rather than the value's sign. If a d value is specified, the data value is multiplied by 10 d .

For more details, see "Reading and Writing Binary Data in UNIX Environments" on page 198.

RB w . d Format

Writes real binary (floating-point) data

Category: Numeric

Width range: 2to8

Default width: 4

Decimal Range: 0 “10

Alignment: left

UNIX specifics: floating-point representation

See: RBw.d format in SAS Language Reference: Dictionary

Details

The RB w.d format writes numeric data in real binary (floating-point) notation. SAS stores all numeric values in floating-point.

Real binary is the most efficient format for representing numeric values because SAS already represents numbers this way and no conversion is needed.

For more details, see "RB w.d Informat" on page 260 and "Reading and Writing Binary Data in UNIX Environments" on page 198.

ZD w . d Format

Writes zoned decimal data

Category: Numeric

Width range: 1to32

Default width: 1

Alignment: left

UNIX specifics: data representation

See: ZDw.d format in SAS Language Reference: Dictionary

Details

The ZD w.d format writes zoned decimal data. This format is also known as overprint trailing numeric format. Under UNIX, the last byte of the field includes the sign along with the last digit. The conversion table for the last byte is as follows :

Digit

ASCII Character

{

1

A

2

B

3

C

4

D

5

E

6

F

7

G

8

H

9

I

-0

}

-1

J

-2

K

-3

L

-4

M

-5

N

-6

O

-7

P

-8

Q

-9

R

For more details, see "ZD w.d Informat" on page 261 and "Reading and Writing Binary Data in UNIX Environments" on page 198.




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net