Comparing Adabas Tables/Views

#### Search Results

Search

# Comparing Adabas Tables/Views

This document covers the following topics:

- Prerequisites for Adabas Tables/Views

- Calling the Function: Compare DD Objects with Adabas Tables/Views

- Parameters for Adabas Tables/Views

- Comparing Adabas Tables and Views in Batch Mode

## Prerequisites for Adabas Tables/Views

Parts of the ADVANCED Interactive Facilities of Adabas SQL Server must be installed within Natural. For detailed information see the requirements table in the respective part of the Predict Installation documentation.

## Calling the Function: Compare DD Objects with Adabas Tables/Views

The Compare DD Objects with Adabas Tables/Views screen is called with code C and object code EQ in any Predict main menu or with the command `COMPARE ESQ`.

    13:01:20             *****  P R E D I C T  *****              2007-05-31
    Plan   0           - Compare DD with Adabas Tbls/Views -            Profile HNO

    Current VM ........ HOME
    File ID ...........                                Files of type ..*
    Contained in DA ...

    Check options                      List options
      File attributes .... Y (Y/N)       Files ........................* D
      Fields ............. Y (Y/N)       Fields .......................* D
                                         Members using differences ....* N
    Update options
      File attributes .... N (Y/N)
      Field sequences .... N (Y/N)
      Add fields ......... N (Y/N)
      Purge fields ....... N (Y/N)
      Field attributes ... N (Y/N)

    Restrictions ........*   Profile HNO ,used              Save set ... N (Y/N)

    Command ===>
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Next  Stop  Last  LnkEl Flip  Print Impl  AdmFi SelFi Prof  Main

## Parameters for Adabas Tables/Views

Parameters
Current VM | ID of the virtual machine object identifying the current environment. A read-only field. See the table of parameter descriptions in the section Comparing Adabas Databases for more information.
File ID | The ID of the Predict file object(s) to be compared with the connected Adabas tables or views. Asterisk notation can be used.
Files of type | For Adabas tables: must be type A (with SQL usage set to Y) or type AT. For Adabas views: must be type B.
Contained in DA | Limit the function to tables and views which reside in the specified database of type A.
Check options
If check options are not set, compare functions will not reset the Modified after generation flag. See Resetting the Modified after generation Flag for more information.
File attributes |
Y | Attributes of the file are to be compared with the implementation of the file in the Adabas table/view.
Fields |
Y | The field list of the file object is to be compared with the Adabas table/view.
List options
Files |
How attributes of the Predict file object are to be displayed.
Y | All file attributes.
N | No file attributes.
D | Different: only file attributes whose Predict values differ from the implementation.
Fields |
How fields linked to the Predict file object are to be displayed.
Y | All fields.
N | No fields.
D | Different: only fields whose Predict definitions differ from the Adabas table/view.
Members using diff. |
Determines the amount of information to be displayed on members using fields that have been compared and whose Predict definition differs from the Adabas table/view.
Y | Display the names and types of all member.
N | Do not display members.
C | Count the number of members per library.
Update options
File attributes |
Y | File attributes are to be updated.
Field sequence |
Y | The field list is to be rearranged to match the sequence of the fields in the Adabas table/view.
Add fields |
Y | Fields in the Adabas table/view missing in the field list are to be inserted in the field list.
Purge fields |
Y | Fields that are missing in the Adabas table/view are to be removed from the field list.
Field attributes |
Y | Attributes of the fields linked to the Predict file object are to be changed to match the Adabas table/view.
Save set |
Y | Program types and names reported by the function are saved in a set. See also Saving the Result of Comparison Funtions in Sets.

## Comparing Adabas Tables and Views in Batch Mode

Command: `COMPARE ESQ`

Enter parameters on the next line in positional or keyword form.

Field | Keyword | Position
--- | --- | ---
File ID | FILE-ID | 1
Files of type | TYPE | 2
Contained in DA | DB | 3
Check options
File attributes | CHECK-FILE | 4
Fields | CHECK-FIELD | 5
List options
Files | LIST-FILE | 6
Fields | LIST-FIELD | 7
Members using differences | LIST-PROGRAM | 8
Save set | SAVE-SET | 9
Update options
File attributes | UPD-FILE | 10
Field sequences | UPD-SEQUENCE | 11
Add fields | ADD-FIELD | 12
Purge fields | PURGE-FIELD | 13
Fields attributes | UPD-FIELD | 14

### Example

To compare all files of type A or B with prefix "TEST" and display all fields with a different definition, code the command:

    COMPARE ESQ
    FILE-ID=TEST*,LIST-FIELD=D

or

    COMPARE ESQ
    TEST*,,,,,D

The example above uses the Natural parameter `ID=,` and `IA==`.

### On this page

- Prerequisites for Adabas Tables/Views
- Calling the Function: Compare DD Objects with Adabas Tables/Views
- Parameters for Adabas Tables/Views
- Comparing Adabas Tables and Views in Batch Mode