ADABAS Essentials |
NATURAL Data Definition Modules |
To reference an ADABAS file and its data fields in NATURAL programs, you must create a NATURAL Data Definition Module (DDM) based on the ADABAS file. (Note that a DDM is often referred to as an ADABAS file, even though it is really only a view of an actual ADABAS file.) A DDM has an assigned name, which references the ADABAS file number on which the DDM is based. Also, more descriptive data field names can be assigned to a DDM. DDMs are stored in a system file, which is simply another ADABAS file.
The filename for a NATURAL DDM can be a maximum of 32 characters.
In a NATURAL DDM, data fields can be assigned a DDM external name of 3 to 32 characters. For example, in the CUSTOMERS DDM, the DDM data field name CUSTOMER corresponds to the ADABAS file two-character data field name CU.
ADABAS Descriptors |
If you plan to use a data field often in selection criteria, you can designate it as a key field. You designate a key field by specifying the descriptor option in the ADACMP utility data definition statement. When a data field is a descriptor field, ADABAS maintains and stores its values in an inverted list. An inverted list contains the different values of a descriptor data field, along with the count and the ISNs of the logical records that contain each value. ADABAS descriptors can also be defined so that inverted lists contain unique values only.
Specifying ADABAS descriptors speeds up the selection process considerably since ADABAS is able to access key values directly. Also, specifying descriptors controls read sequence when reading ADABAS data sequentially.
Several descriptor types can be specified for a data field. Each descriptor type is explained below.
Note: In order for you to use SAS variables corresponding to ADABAS data fields in a SAS BY statement, an SQL ORDER BY clause, or a view SORT clause, the data field must be designated as an ADABAS descriptor. Regarding a WHERE clause, there are conditions when you can use a nondescriptor data field and when you must use a descriptor data field. These conditions are explained in ACCESS Procedure Reference.
A subdescriptor is an ADABAS descriptor that is derived from a portion of an elementary data field. For example, if ZIPCODE is a data field, a subdescriptor for it could be ZIPLAST2 defined for the last two digits of a zipcode.
You can include a subdescriptor in SAS/ACCESS descriptor files for retrieval and selection criteria, but you cannot use subdescriptors in SAS updating procedures.
A superdescriptor is an ADABAS descriptor derived from more than one data field, portions of data fields, or combinations thereof. For example, a superdescriptor named STATE-ZIPLAST2 could be defined for the first two digits from the STATE data field and the last two digits from the ZIPCODE data field.
You can include a superdescriptor in SAS/ACCESS descriptor files for retrieval and selection criteria, but you cannot use superdescriptors in SAS updating procedures.
A phonetic descriptor is an ADABAS descriptor defined to perform searches based on phonetic values, for example, retrieval by family name.
You can include a phonetic descriptor in SAS/ACCESS descriptor files for retrieval and selection criteria, but you cannot use phonetic descriptors in SAS updating procedures.
Note that if you use a phonetic descriptor in a SAS WHERE clause, the interface view engine must be able to process the entire SAS WHERE clause.
Note: The hyperdescriptor type is not described because hyperdescriptors are not supported by the SAS/ACCESS interface to ADABAS. Your ADABAS file can contain hyperdescriptors, but they will be ignored.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.