Chapter Contents |
Previous |
Next |
SAS/ACCESS Interface to CA-DATACOM/DB: Reference |
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 |
Tables |
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.
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 |
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.
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) |
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.
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.