Chapter Contents

Previous

Next
SAS/ACCESS Interface to ADABAS Software

ADABAS Databases

An ADABAS database is a collection of data organized into ADABAS files. Each database has an associated database identifier, which is a numerical value in the range 1 to 255, and a database name, which is a character value with a maximum of 16 characters. Each database can consist of up to 255 ADABAS files.

An ADABAS database consists of three system files: Data Storage, Associator, and Work Storage.

To use the SAS/ACCESS interface to ADABAS, you need to be familiar with three ADABAS components: ADABAS files, NATURAL DDMs, and ADABAS descriptors (which is an ADABAS data field that provides an index of its values). ADABAS files and NATURAL DDMs are the components from which you create SAS/ACCESS access descriptor and view descriptor files. Knowing about ADABAS descriptors can help you minimize ADABAS's processing time for your SAS/ACCESS view descriptors.

Note:   To avoid confusion, keep in mind the two usages of the term descriptor throughout this book:

  [cautionend]

The following sections describe ADABAS files, NATURAL DDMs, and ADABAS descriptors.


ADABAS Files

An ADABAS file is a collection of logically related data, organized by data fields and logical records. ADABAS permits maximums of 926 data fields and 16,777,215 logical records in each ADABAS file.

Sample ADABAS File illustrates four data fields and seven logical records from an ADABAS file containing data about customers. The data fields are the vertical columns of data. The logical records are the horizontal rows of data.

Sample ADABAS File
       
CU           CI               ST        CO

14324742     San Jose         CA        USA     
14569877     Memphis          TN        USA
14898029     Rockville        MD        USA
24589689     Belgrade                   Yugoslavia
26422096     La Rochelle                France
38763919     Buenos Aires               Argentina
46783280     Singapore                  Singapore

ADABAS files are created with the ADABAS utility ADACMP. (To see the ADABAS data definition statements that created the ADABAS files used in this book, refer to Example Data.)

ADABAS File Number

When you create an ADABAS file, you assign a file number using the FILE= statement of the ADACMP utility. Each database can consist of up to 255 ADABAS files.

Level Number

A data field level number is a one- or two-digit number, from 01 to 07, used in conjunction with data field grouping. (Grouping is discussed in ADABAS Data Fields.) Data fields with a level of 2 or greater are considered to be a part of the immediately preceding group, which has a lower level number.

Data Field Names

ADABAS data fields are identified by a two-character name. Each data field name in an ADABAS file must be unique. The first character must be alphabetic, and the second character can be either alphabetic or numeric. For example, AA and B4 are valid data field names.

Logical Record ISN

Each logical record within an ADABAS file is assigned an internal sequence number (ISN). An ISN is the logical identifier for each record. ISNs are unique within each ADABAS file.

Note:   When you create SAS/ACCESS descriptor files for ADABAS data, the ACCESS procedure creates a SAS variable named ISN. This variable gives you access to the ISNs for all logical records stored in the ADABAS file.  [cautionend]


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 that the DDM is based on. 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.

DDM File Name

The filename for a NATURAL DDM can be a maximum of 32 characters.

Data Field Names

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 in sequential order.

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 (both view and SAS), 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.  [cautionend]

Subdescriptor

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 System updating procedures.

Superdescriptor

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 System updating procedures.

Phonetic Descriptor

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 System 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.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.