One way that SAS interacts with IMS databases is through an
interface view engine that makes use of
SAS/ACCESS descriptor files created with the ACCESS procedure.
There are two types of descriptor files:
An
access descriptor contains information about the IMS
database that you want to use. The information includes the IMS database name, the IMS
field names and their default SAS formats, database formats,
segment names and lengths, and key fields. An access descriptor also contains any special
handling considerations for a field and indicates whether
an item occurs multiple times in a database segment. You use the access descriptor
to create view descriptors. An access descriptor is like a master descriptor file
for a single IMS database because it contains a complete description of that database
(if you choose to enter all the data). Because IMS does not store descriptive information
about a database, you must enter the database definition in the access descriptor.
A
view descriptor defines a subset of the data that is described by an access descriptor.
Note: This subset must contain
data from only one path in the database on which the access descriptor
is based. You choose this subset by selecting particular items and
specifying criteria that the data must meet.
For example, you might
want to select two items, CUSTOMER_NAME and STATE, and specify that
the value stored in item STATE must equal NC
.
A
view descriptoris a
SAS data set of
member type VIEW. After you create your view descriptors, you can use them in a SAS program to
read or write the data directly from and to an IMS database, or you can extract IMS
data and place it in a
SAS data file. Typically, you have several view descriptors (each selecting a different
path of data in the database) for each access descriptor that you have defined.