SAS/ACCESS Interface to ADABAS Software 
When you create SAS/ACCESS descriptor files
from
ADABAS data,
the ACCESS procedure converts data field types and lengths to default SAS
System variable formats and informats.
The following summary information will help you understand
the data conversion.
 The ADABAS interface
view engine uses ADABAS standard length
and type for reading and updating ADABAS data
(except for variablelength fields and DB Content overrides). NATURAL DDMs
have no effect other than to use DDM length and decimals to set SAS formats.
 Length and decimal points specified by DDMs might
conflict with the ADABAS file definition
(for example, not big enough, too big, and so on). If so, the ADABAS standard
length is used to set default SAS formats.
 Packed, unpacked, and binary types can hold very
large numeric data values. The SAS System can maintain precision up to sixteen
digits. Unpacked fields larger than sixteen bytes are converted to the character
hexadecimal type upon which no numeric operations can occur. Therefore, precision
is not a problem. For large packed and binary fields, however, you must be
aware that precision can be lost when data values exceed sixteen digits.
 If the standard length is 0 (that is, if the data
field has a variable length), the ACCESS procedure chooses a default length.
 The default length for an alphanumeric is
20.
 The default length for a numeric is the maximum
length before assuming a character hexadecimal type. Packed is 15 bytes (29
digits and a sign), unpacked is 16 bytes (16 digits and a sign), binary is
8 bytes, fixed is 4 bytes, and float is 8 bytes.

Superdescriptors and subfields are given an ADABAS type
of character unless all of the parent fields are numeric. Then, they are
given an ADABAS type of binary. Their
length is calculated by totaling the number of bytes in the individual parent's
fromto specification. If the length of a binary superdescriptor or subdescriptor
is greater than 8, the SAS format is changed from numeric to character hexadecimal.
 Subdescriptors and subfields take the type of
their parent and the length of their fromto specification.
 Phonetic descriptors are alphanumeric and use
the length of the phonetic parent. Any retrieval of a phonetic descriptor
is actually retrieval of its parent.
 If ADABAS data
fall outside the valid SAS data ranges, you will get an error message in the
SAS log when you try to read the data. For example, an ADABAS date
might not fall in the valid SAS date range.
The following table shows the default SAS System variable
formats and informats that the ACCESS procedure assigns to each ADABAS data
type in an ADABAS file.
Default SAS Formats and Informats for ADABAS File Processing
ADABAS Type 
Description 
Standard Length in Bytes 
SAS Format and Informat 
A 
alphanumeric 
<=200 
$ADBLEN. 


>200 
$200 
B 
binary 
< = 4 
(2 x ADBLEN) + 1 

(unsigned) 
> 4 and < =8 
(2 x ADBLEN). 


> 8 and < =100 
$HEX(2 x ADBLEN) . 


> 100 
$HEX200. 
F 
fixed (signed) 

8. 
G 
floating point (signed) 

BEST12. 
P 
packed decimal (signed) 

(2 x ADBLEN + 1). 
U 
unpacked decimal 
< = 16 
(ADBLEN + 1). 

(zoned decimal) 
> 16 
$HEX(2 x ADBLEN). 

(signed) 


The following information applies to this table:
 ADBLEN = ADABAS standard
length (in bytes). If the standard length equals 0, then the interface view
engine sets the length based on the data type, as follows: A=20, B=8, F=4,
G=8, P=15, and U=16.
 Binary data that are
 < = 4 bytes are treated as signed
numbers
 < = 8 bytes and > 4 bytes are treated as positive
(unsigned) numbers
 > 8 bytes are treated as character hexadecimal
data.
 Numeric values greater than 16 displayable digits
can lose precision.
The following table shows the default SAS System variable
formats and informats that the ACCESS procedure assigns to each ADABAS data
type in a NATURAL DDM.
Default SAS Formats and Informats for NATURAL DDM Processing
ADABAS Type 
Description 
Standard Length in Bytes 
SAS Format and Informat 
A 
alphanumeric 
< = 200 
$DDMLEN. 


> 200 
$200. 
B 
binary (unsigned) 
< = 4 
(DDMLEN + DECPT + SIGNPT) . 


> 4 and < = 8 
(DDMLEN +DECPT) . 


> 8 and < = 100 
$HEX(2 x ADBLEN). 


> 100 
$HEX200. 
F 
fixed (signed) 

(DDMLEN + DECPT + SIGNPT) . 
G 
floating point (signed) 

BEST12. 
P 
packed decimal (signed) 

(DDMLEN + DDMDEC + DECPT + SIGNPT) .
DDMDEC. 
U 
unpacked decimal (zoned decimal) (signed) 
< = 16 
(DDMLEN + DDMDEC + DECPT + SIGNPT) .
DDMDEC. 


> 16 
$HEX(2 x ADBLEN). 
The following information applies to this
table:
 DDMLEN = DDM digits to the left of
the decimal point.
 DDMDEC = DDM digits to the right
of the decimal point.
 ADBLEN = ADABAS standard
length in bytes. If the standard length equals 0, then the interface view
engine sets the length based on the data type, as follows: A=20, B=8, F=4,
G=8, P=15, and U=16.
 DECPT = 1 when DDM digits to the
right of the decimal point are greater than 0.
 DECPT = 0 when DDM digits to the
right of decimal point are equal to 0.
 SIGNPT = 1 when numeric type is signed
data (fixed, float, packed, unpacked, and binary 4).
 SIGNPT = 0 when numeric type is unsigned
data (binary > 4 and l8).
 Binary data that are
 4 bytes are treated as signed
numbers
 8 bytes and > 4 bytes are treated as positive
(unsigned) numbers
 > 8 bytes are treated as character hexadecimal
data.
 Numeric values greater than 16 displayable digits
can lose precision.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.