DATACOM Overview and Mapping Considerations

In this section:

DATACOM is a flat file database management system. The DATACOM DATA DICTIONARY stores and manages descriptive data about a data source.

To access DATACOM data sources, you describe them to server, using server terminology and attributes. The descriptions are kept in a Master File and an associated Access File.

The Master File tells the server how to interpret the DATACOM data structure. It identifies the DATACOM:

The Access File creates a bridge between the server and DATACOM. It translates server terminology into DATACOM syntax by identifying the appropriate DATACOM:

When the server receives a request, it:

The Adapter for DATACOM opens the URT and builds calls to DATACOM. The adapter retrieves the data and passes it to the server. The server then creates the answer set.

For details on describing data sources to a server and on Master Files and Access Files, and examples of DATACOM logical files, fields, and elements, see Mapping Structures in the Server.


Top of page

x
Data Structures

A DATACOM structure is a collection of one or more logical data sources, identified by a unique ID number. Each logical data source contains data records with a defined set of fields, elements, and keys, and is identified by a unique, alphanumeric 3-byte table name.

A data record consists of one or more elements. An element is the smallest logical unit of data a program can request; it has a unique 5-byte name. Elements consist of one or more contiguous fields and may have an associated security code. Because a field may belong to more than one element, the elements themselves may overlap.

DATACOM locates records through keys. Each data source may have up to 999 keys (not necessarily contiguous) consisting of 1-180 fields which total a length of 180 bytes. Each key is identified by a 5-byte name and a 3-byte numeric ID. The use of keys in the DATACOM Compound Boolean Selection Facility is transparent to the user.

The table below is the structure of the sample PERSON data source. It contains one key, three elements with fields that overlap, and seven unique fields.

Note: The DATACOM DATA DICTIONARY listing of the PERSON data source does not identify the specific fields in each element. For more information, refer to the DATA DICTIONARY Element Field Report.

The Employee Record Element (EMDTA) contains all seven fields in the data source.

The Employee Address Element (ADEMP) contains six fields that represent the employee ID and address. These are:

NUMBER
NAME
STREET_ADDRESS
CITY_ADDRESS
STATE_ADDRESS
ZIP_CODE_LOC

The Employee Identification Element (IDEMP) contains the NUMBER and NAME fields. All fields within each element are contiguous.


Top of page

x
Mapping Structures in the Server

Reference:

DATACOM terms equate to server terms as follows:

DATACOM Master File Definition

Server Master File Attributes

File

SEGMENT

Element

ALIAS for groups of fields

Field

FIELD

Field Length (LNGTH)

ACTUAL (DATACOM Format)USAGE (Server Format)

When you describe a DATACOM data source in a Master File:



Example: Sample DATA DICTIONARY Element Field Report

The following example represents the DATA DICTIONARY Element Field Report for the Employee Record Element from the PERSON data source. For related information, see Employee Record Element From PERSON Data Source. For an explanation of the column headings in the report, see Element Field Report Headings.



Example: Employee Record Element From PERSON Data Source

The following Master File and Access File describe the Employee Record Element from the DATACOM PERSON data source.

Master File PERSON

FILENAME=PERSON, SUFFIX=DATACOM , $
  SEGMENT=PERSON, SEGTYPE=S0, $
    FIELDNAME=NUMBER,          ALIAS=EMDTA.0000, USAGE=P5,  ACTUAL=Z5,  $
    FIELDNAME=NAME,            ALIAS=EMDTA.0001, USAGE=A24, ACTUAL=A24, $
    FIELDNAME=STREET_ADDRESS,  ALIAS=EMDTA.0002, USAGE=A24, ACTUAL=A24, $
    FIELDNAME=CITY_ADDRESS,    ALIAS=EMDTA.0003, USAGE=A15, ACTUAL=A15, $
    FIELDNAME=STATE_ADDRESS,   ALIAS=EMDTA.0004, USAGE=A2,  ACTUAL=A2,  $
    FIELDNAME=ZIP_CODE_LOC,    ALIAS=EMDTA.0005, USAGE=A5,  ACTUAL=A5,  $
    FIELDNAME=SOCIAL_SECURITY, ALIAS=EMDTA.0006, USAGE=P10, ACTUAL=P5,  $

Access File PERSON

USERTABLE=SAMPURT, TRACE=NO, $
 SEGNAME= PERSON, TABLENAME=PMF, DBID=1, KEYNAME=EMPNO, $
  FIELD=NUMBER, SIGN=N, TYPE=C, $
  FIELD=SOCIAL_SECURITY, SIGN=Y, TYPE=C, $


x
Reference: Element Field Report Headings

Column Heading

Definition

LV (LEVEL)

The two-digit field level number.

C (CLASS)

Code representing the field class. Codes for the valid classes are:

C = Compound (or parent) field
F = Filler field
I = Index
S = Simple field
V = Value (or qualifier) field

FIELD-NAME

Data dictionary occurrence name of the field.

PARENT-NAME (RECORD-NAME)

Data dictionary occurrence name of the parent field.

Applies to compound fields only.

DISPL(DISP-IN-TABLE)

Displacement of the field in the record or table.

LNGTH (LENGTH)

Length of the field in bytes.

For fields defined with a V data type (VARCHAR), this value includes the automatically generated two-byte field that defines the data's length.

T (TYPE)

Code representing the data type of the field. Codes for the valid data types are:

B = Binary
C = Character
D = Packed decimal
E = Extended-precision floating-point
G = Graphics character set
H = Hexadecimal with 2 characters per entry
K = Kanji
L = Long-precision floating-point
N = Numeric field zoned decimal
S = Short-precision floating-point
T = PL/1 bit representation
V = Variable length character
Y = Pure DBCS Double-Byte Character Set
Z = Mixed DBCS and EBCDIC
2 = Halfword binary
4 = Fullword binary
8 = Double word binary

J (JUSTIFICATION)

Justification:

L = Left-justified
R = Right-justified

N (NULL-INDICATOR)

Null indicator:

N = No null-indicator, a one-byte indicator preceding this field.

Y = Null indicator is present.

S (SIGN)

Sign:

Y = Signed
N = No sign

DEC (DECIMALS)

Decimal places for numeric, packed decimal, and binary fields.

RPFAC (REPEAT)

Repetition factor.

VALUE

Value attribute.

This is either the default value of the field or the value associated with a qualified (CLASS=V) field.

DESCRIPTION

FIELD entity-occurrence description.

PRECISION

Specifies the maximum number of displayable digits allowed for data stored in fields. Available TYPEs are:

D = Decimal
N = Numeric
G = Graphic
V = Varchar
W = Vargraphic


iWay Software