Chapter Contents

Previous

Next
SAS/ACCESS Interface to CA-DATACOM/DB: Reference

CA-DATACOM/DB Databases

A CA-DATACOM/DB database is a collection of CA-DATACOM/DB tables, organized within certain CA-DATACOM/DB areas and files. Each table consists of records that have one or more FIELD entity-occurrences.

You need to know about several types of CA-DATACOM/DB entity-types to use the SAS/ACCESS interface to CA-DATACOM/DB. The most important entity-types are databases and records, which contain fields. Fields contain the actual data values, which are either character or numeric type.

You can define a field as a simple field or a compound field. Fields can also become keys, and two special keys, the Native Key and the Master Key, are required for each table. CA-DATACOM/DB generates an index for each key field. Knowing about the Native Key and the indexes can help you minimize CA-DATACOM/DB processing time for your view descriptors. In addition, fields can repeat. For more information about fields, see Fields, Keys, and Elements.

Typically, a database is organized according to the types of data and how you want to use the data. You must understand and be familiar with your database's organization in order to retrieve and update information accurately and efficiently. And you must be familiar with the organization and contents of the database to create descriptor files for the SAS/ACCESS interface.

The following sections describe the various CA-DATACOM/DB entity-types that pertain to the SAS/ACCESS interface to CA-DATACOM/DB.


Database Names

Each DATABASE entity-occurrence in the CA-DATADICTIONARY database has a unique name, from 1 to 32 characters long. A database also has a status (TEST or PROD) and version associated with it.


Tables

A table consists of some number of records, each having one or more fields. The table name is the name of a RECORD entity-occurrence, up to 32 characters long. Data records in the table are ordered by the values for an assigned field called the Native Key. CA-DATACOM/DB permits up to 240 tables in a database. The tables can be spread across one or more CA-DATACOM/DB areas. When you define a record for a table, you must define at least one field, one key, and one element for that record.

To create descriptor files for the SAS/ACCESS interface, you must know the name of the RECORD entity-occurrence (table) and the userid and optional password for CA-DATADICTIONARY. An access descriptor and its associated view descriptors pertain to only one table.

A Sample CA-DATACOM/DB Table illustrates four fields from the table CUSTOMERS. Field names are shown at the top of the columns. Each row represents the values in a record. The first field, CUSTOMER, is the Native Key in this table, which causes the records to be maintained in order by customer number.

A Sample CA-DATACOM/DB Table
        CUSTOMER     CITY                STATE     COUNTRY
        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


Fields, Keys, and Elements

Each FIELD entity-occurrence has a name (of up to 32 characters) and specific attributes, such as the data type. For more information on data types, see Data Types.

You can define several kinds of fields, as described briefly here.


Data Types

A CA-DATACOM/DB field can be any one of a variety of data types; they are all basically type character or type numeric, as discussed below.

When you create a view descriptor, the ACCESS procedure assigns SAS formats, informats, and so on, in addition to SAS column names from the CA-DATACOM/DB field names. See ACCESS Procedure Data Conversions for the default SAS column formats and informats for each CA-DATACOM/DB data type. You can change the default formats and informats.

Numeric Data Types

Here are some of the numeric types available for CA-DATACOM/DB fields:
B Binary
D Packed decimal
E Extended floating-point
L Long floating-point
N Numeric (zoned decimal)
S Short floating-point
2 Halfword binary (aligned)
4 Fullword binary (aligned)
8 Doubleword binary (aligned)

Character Data Types

Here are some of the character types available for CA-DATACOM/DB fields:
C Character
G Graphics data
H Hex character
K Kanji (same as type Y)
T PL/I bit representation
Y Double byte character set (DBCS)
Z Mixed DBCS and single byte

Note:   CA-DATACOM/DB does not support date types. If you store dates in a CA-DATACOM/DB numeric field, identify the representation with a SAS date format in the DB Content field in your descriptor files.  [cautionend]

Nils--Missing Values

Missing values in a CA-DATACOM/DB table are referred to as nil values or simply nils. Nil values for both character and numeric type data are blanks, that is, HEX (40)s. All fields of a key must contain blanks for a value to be nil. There are no valid packed decimal or zoned decimal nil values. Optionally, you can specify binary zeros for nils (see System Options).

In the SAS System, nils are referred to as missing values. CA-DATACOM/DB and the SAS System handle missing values differently, but the interface view engine takes care of the differences. See Missing Values (Nils) for a discussion of the differences.


Chapter Contents

Previous

Next

Top of Page

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