ACCESS Procedure Reference |
When you create SAS/ACCESS descriptor files from ADABAS data, the ACCESS procedure converts data field types and lengths to default SAS 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 variable-length 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. SAS can maintain precision up to 16 digits. Unpacked fields larger than 16 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 16 digits.
If the standard length is 0 (that is, if the data field has a variable length), the ACCESS procedure chooses a default length.
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 from-to 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 from-to 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 falls 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 variable formats and informats that the ACCESS procedure assigns to each ADABAS data type in an ADABAS file.
ADABAS Type | Description | Standard Length in Bytes | SAS Format and Informat |
---|---|---|---|
A | alphanumeric |
|
$ADBLEN. |
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.
Numeric values greater than 16 displayable digits can lose precision.
The following table shows the default SAS variable formats and informats that the ACCESS procedure assigns to each ADABAS data type in a NATURAL DDM.
ADABAS Type | Description | Standard Length in Bytes | SAS Format and Informat |
---|---|---|---|
A | alphanumeric |
|
$DDMLEN. |
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:
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).
Numeric values greater than 16 displayable digits can lose precision.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.