Version 7.7.3
 —  Adabas Manager Documentation  —

Field Definition Table (FDT)

This document is organized as follows:

System fields (Adabas 8.2.2 only)

Adabas 8.2.2 now allows you to define system fields in your Adabas files.

A system field is a field in an Adabas file whose value is automatically set by the Adabas nucleus when records are inserted or updated on the file. They may not be part of a periodic group but can be simple fields or MU fields (although not MU fields in a periodic group).

Optionally, you can specify that some system field values only be set when records are inserted. System fields are fields that store information such as the job name of the user making the update, the eight-byte user ID of the user, the session ID of the user, or the time at which the update was made (see the information on CR option).

The value of a system field refers to an insert or update of an entire record. You cannot define a system field that refers to only a portion of a record.

Values for system fields are saved in the compressed storage record in the same manner that other Adabas fields are stored.

For detailed information on system fields see System Fields in the Adabas for Mainframes Concepts and Facilities documentation.

Start of instruction setTo review the Field Definition Table (FDT) for a file:

  1. List the files in a database, as described in Listing Database Files.

  2. If an icon appears in the Fields column of the list of files table in detail-view, click the icon.

    The FDT for the file appears in detail-view. The table provides the following information:

    Field Explanation
    Level the field level
    Name the field name
    Length the field length
    Format the data type of the field:
    A alphanumeric
    B binary
    F fixed point
    P packed decimal
    G floating point
    U unpacked decimal
    W wide-character
    Option
    DE descriptor
    FI fixed storage
    LA long alphanumeric
    LB large object field
    MU multiple-value field
    NC null/not counted
    NN null not allowed
    NU null value suppression
    NV not converted (alpha and wide-character fields)
    PE periodic group
    UQ unique descriptor
    XI index (occurrence) number excluded from UQ in PE
    Predict Name equivalent Predict name, if any

    When available, the Special Descriptor Table (SDT) is also displayed. It shows field information about all sub-/super-/hyperdescriptors, collation descriptors, phonetic descriptors, and sub-/superfields for the file.

    The table provides the following information:

    Column Explanation
    Type
    SUB subfield/subdescriptor
    SUPER superfield/superdescriptor
    PHON phonetic descriptor
    HYPER hyperdescriptor
    COL collation descriptor
    Name the field name
    Length the field length
    Option
    DE descriptor field
    FI fixed point
    LA long alphanumeric
    MU multiple-value field
    NC null/not counted
    NN null not allowed
    NU null value suppression
    NV not converted (alpha and wide-character fields)
    PE periodic group
    UQ unique descriptor
    XI index (occurrence) number excluded from UQ in PE
    Parent the name of the parent field for this descriptor.
    Predict Name equivalent Predict name, if any

You can also export a Field Definition Table and import it later during the creation of a new file.

Start of instruction setTo export an FDT:

  1. Display the FDT and press Export FDT.

  2. In the resulting Export Field Definition Table panel, specify the location for the file and click OK to save your entries or Cancel to return to the FDT.


Referential Integrity Constraints

A referential constraint ensures referential integrity between two keys. Keys can be descriptors, superdescriptors or ISNs. Referential integrity means that for every value in a descriptor called “foreign key”, there must be a value in a descriptor called “primary key" in a primary file. The primary key must be defined as unique and the options NC and NN must be set. For the foreign key, the option NC must be set. A pair of primary and foreign key must have the same format. ISNs can be used as primary keys and the corresponding foreign key must be binary. If primary and foreign keys are superdescriptors, then

You can specify a referential action that is executed on the foreign key record if a primary key value is modified.

The referential constraint is added to the file to which the foreign key belongs.

Note:
The setting of referential constraints is a designated long running utility because all descriptor entries must be checked to ensure that they do not violate the new constraint.

See also Referential Constraints in FDT Record Structure in the Adabas Administration documentation for open systems.

Start of instruction setTo add a constraint:

  1. In the Field Definition Table (FDT), press Add Constraint.

  2. In the resulting Referential Constraints panel, enter the required specifications and click OK to save your entries or Cancel to return to the FDT.

Top of page

Changing Field Parameters

Note that Adabas for Open Systems now supports referential integrity constraints - this means that any field in a file which is defined as a foreign key can only contain values from a primary files's primary key. This prevents you from defining records in a file containing a foreign key value that is not contained in the corresponding primary file as a primary key value (for more information see Referential Integrity Constraints and also Referential Constraints in FDT Record Structure in the Adabas Administration documentation for open systems).

Start of instruction setTo change field parameters:

  1. In the Field Definition Table (FDT), click the name of the field you want to change the parameters for.

    The Change Field Parameters panel is displayed.

  2. To modify the standard length of an Adabas field, update the Length value as required.

    For mainframe databases you can also select the LA option to change a normal alphanumeric (A) field to a long-alpha (LA) field. If the file is protected, supply the password.

  3. Click OK to save your entries or Cancel to return to the file list display.

Top of page

Logically Deleting/Undeleting Fields

With Adabas Manager version 7.7.3 you can logically delete and undelete a field from a database file. Logically deleting a field from a file removes the field from the FDT, but retains the field data in the database. Logically undeleting a field that was previously logically deleted reinstates the field in the FDT.

Note:
Logically undeleting a field is only possible for mainframe databases.

Start of instruction setTo delete a field:

  1. In the Field Definition Table (FDT), click the name of the field you want to delete.

    The Change Field Parameters panel is displayed.

  2. Click Delete Field or Cancel to return to the file list display.

    The field is displayed in the FDT with the option deleted.

    Note:
    The parent field of a descriptor cannot be deleted; attempting to delete such a field will result in an error message.

Deleting a field in the Field Definition Table (FDT) only logically deletes the field; the field can be reactivated at any time.

Start of instruction setTo reactivate a logically deleted field (mainframe databases only):

  1. In the Field Definition Table (FDT), click the name of the deleted field you want to reactivate.

    The Change Field Parameters panel is displayed.

  2. Click Undo Field Deletion or Cancel to return to the file list display.

    The field is displayed in the FDT without the option deleted.

Top of page

Descriptors

Setting and Releasing Descriptors

Field names listed in the Field Definition Table (FDT) with an option "DE" are descriptors. You can remove a descriptor by freeing the specified field's inverted list in the Associator.

The functions Release Descriptor, Set Unique Descriptor and Reset Unique Descriptor are designated long running utilities.

Start of instruction setTo release a descriptor:

  1. In the Field Definition Table (FDT), click the name of the field you want to release the descriptor for.

    Or:
    If a Special Descriptor Table (SDT) is shown, click the icon in the Parameters column of the descriptor you want to release.

    The Change Field Parameters panel is displayed.

  2. Click Release Descriptor.

  3. In the resulting panel, confirm that you want to release the descriptor by clicking on OK, or Cancel. Both options will return you to the FDT display.

Start of instruction setTo set a unique descriptor for open systems databases:

  1. In the Field Definition Table (FDT), click the name of the field you want to set the descriptor for.

    Or:
    If a Special Descriptor Table (SDT) is shown, click the icon in the Parameters column of the descriptor you want to set to unique.

    The Change Field Parameters panel is displayed.

  2. Click Set Unique Descriptor.

  3. In the resulting panel, confirm that you want to set the descriptor by clicking on OK, or Cancel. Both options will return you to the FDT display.

Start of instruction setTo reset a unique descriptor for open systems databases:

  1. In the Field Definition Table (FDT), click the name of the field you want to reset the descriptor for.

    Or:
    If a Special Descriptor Table (SDT) is shown, click the icon in the Parameters column of the descriptor you want to reset.

    The Change Field Parameters panel is displayed.

  2. Click Reset Unique Descriptor.

  3. In the resulting panel, confirm that you want to reset the descriptor by clicking on OK, or Cancel. Both options will return you to the FDT display.

Logically Deleting Descriptors (Adabas version 8.2 only)

Field names listed in the Field Definition Table (FDT) with an option "DE" are descriptors; this option can be logically removed from a field.

Start of instruction setTo logically delete a descriptor:

  1. In the Field Definition Table (FDT), click the name of the field you want to remove the descriptor from.

    The Change Field Parameters panel is displayed.

  2. Click Logically Delete to remove the descriptor and return to the FDT.

Top of page

Predict Parameters for Mainframe Databases

The following Predict parameters must be specified in the FDT to enable the display of the Predict field name of a file.

Start of instruction setTo set the Predict parameters:

  1. In the Field Definition Table (FDT), click the name of the field you want to set the parameters for.

    The Change Field Parameters panel is displayed.

  2. In the upper left corner of the FDT display, click Properties (graphics/fileprop.png).

    The Predict Parameters panel appears.

  3. Enter the following parameters:

    FDIC DBID The ID of the database containing the Predict repository.
    FDIC FNR The file number of the FDIC file.
  4. Click OK to save your entries or Cancel to return to the file list display.

Top of page

Adding New Fields in the Field Definition Table (FDT)

Start of instruction setTo add new fields in the Field Definition Table (FDT):

  1. In the Field Definition Table detail-view, click Add Field.

    The Add New Fields panel for the file is displayed.

  2. Specify the new fields you want to add to the file.

  3. Click New to add more rows to the table if necessary.

  4. Click OK to save your modifications or Cancel to return to the previous panel.

Top of page