Comparing Adabas Files

#### Search Results

Search

# Comparing Adabas Files

This document covers the following topics:

- Prerequisites and Restrictions for Adabas Files

- Calling the Function: Compare DD Objects with Adabas Files

- Parameters for Adabas Files

- Comparing Adabas Files in Batch Mode

## Prerequisites and Restrictions for Adabas Files

- Adabas files and Predict files to be compared must be connected. There is one exception to this rule: if AOS is not installed, implemented Adabas files and Predict file objects can be compared even if they are not connected.

- If Natural Security function protection for Predict is activated, permission is required to compare Adabas files.

See also General Prerequisites for Comparison Functions.

## Calling the Function: Compare DD Objects with Adabas Files

The Compare DD Objects with Adabas Files screen is called with code C and object code AF in any Predict main menu or with the command `COMPARE FDT`.

    10:55:35             *****  P R E D I C T  *****              2007-05-31
    Plan   0          - Compare DD Objects with Adabas Files -          Profile HNO

    Current VM ....... HOME
    File ID ..........                                  File number ......
    Contained in DA ..                                  Database number ..
    Check options                          List options
      File attributes .......... Y (Y/N)     File attributes.............* D
      Fields ................... Y (Y/N)     Fields .....................* D
      Even if only FDT exists .. Y (Y/N)     Members using differences ..* N
      Adabas password ..........
    Update options
      File attributes .........* N
      Field sequences .......... N (Y/N)
      Add fields ............... N (Y/N)
      Purge fields ............. N (Y/N)
      Field attributes ........* 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 Files

Parameters
Current VM | ID of Predict virtual machine object identifying the environment of the Adabas file. A read-only field. See also table of parameter descriptions in the section Comparing Adabas Databases.
File ID | ID of the Predict file object of type A to be compared with the connected Adabas file. Asterisk notation can be used.
Contained in DA | Limits the function to files in this database. Asterisk notation can be used.
File number | File with this file number is processed.
Database number | Only file in database with this number is processed.
Check options
If the check options File attributes or Fields 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 database (space allocation, for example). Attributes not required when loading a file are compared only if they are specified in the Predict object. This setting is valid only when Adabas Online Services is available and the file that is to be compared resides in a database of Adabas Version 6 or above.
Fields |
Y | The field list of the file object is to be compared with the Adabas file definition table (FDT).
Even if only FDT exists |
Y | A file is to be compared even if it has been deleted with the Keep FDT option.
N | File is not compared. For this setting, three conditions must be met: the Adabas Online Services selectable unit must be installed the file to be compared must reside in a database of Adabas Version 6 or above the file to be compared must not have been deleted with the Keep FDT option.
Adabas password | Password required to access the file if the file is protected by Adabas security. Passwords are not converted to upper case.
List options
File attributes |
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 FDT.
Members using differences |
Determines the amount of information to be displayed on members using external objects that differ from the corresponding Predict objects. The following differences are possible: file numbers of Predict file objects differ from the FDT or a userview of such a file. Predict field objects differ from the FDT. Valid values:
Y | Display types and names of all members using files that differ in any of the above ways.
N | Do not display members.
C | Count the number of members per library.
Update options
Update options are effective only if parameters Save set and Members using differences are set to N.
File attributes |
How attributes of the Predict file object are to be updated. Provided that the Adabas Online Services selectable unit is available and the file that was compared resides in a database of Adabas Version 6 or above, one of the following can be specified:
R | File attributes required when loading a file and any other file attributes specified in the Predict object.
N | No file attributes.
O | File attributes not required when loading a file are updated only if they are specified in the Predict object.
Field sequences |
Y | The field list is to be rearranged to match the sequence of the fields in the FDT.
Add fields |
Y | Fields in the FDT that are missing in the field list are to be inserted in the field list.
Purge fields |
Y | Fields in the field list that are missing from the FDT are to be removed from the field list.
Field attributes |
How attributes of the fields linked to the Predict file object are to be changed to match the FDT.
A | All field attributes.
N | No field attributes.
I | Field attributes that can only be changed in the FDT by deleting and re-implementing the file. After fields have been updated, the function Edit elements of a file is executed automatically and a catalog is performed.
Note We recommend that you set all or none of the field update parameters to Y. Otherwise confusing results may occur, especially if the Field sequence parameter is not set to Y. For example, a periodic group may be inserted out of sequence. A cursory inspection might then give the false impression that the group's member fields are on the wrong level.
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 Files in Batch Mode

Command: `COMPARE FDT`

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

Field | Keyword | Position
--- | --- | ---
File ID | FILE-ID | 1
Contained in DA | DB | 2
File number | FNR | 3
Database number | DBNR | 4
Check options
File attributes | CHECK-FILE | 5
Fields | CHECK-FIELD | 6
Even if only FDT exists | EVEN-ONLY-FDT | 7
Adabas password | PSW | 8
List options
Files | LIST-FILE | 9
Fields | LIST-FIELD | 10
Members using differences | LIST-PROGRAM | 11
Save set | SAVE-SET | 12
Update options
File attributes | UPD-FILE | 13
Field sequence | UPD-SEQUENCE | 14
Add fields | ADD-FIELD | 15
Purge fields | PURGE-FIELD | 16
Field attributes | UPD-FIELD | 17

### Example

To compare all files in database "TEST" and display all fields with a different definition, code the command:

    COMPARE FDT
    DB=TEST,LIST-FIELD=D

or

    COMPARE FDT
    ,TEST,,,,,,,,,D

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

### On this page

- Prerequisites and Restrictions for Adabas Files
- Calling the Function: Compare DD Objects with Adabas Files
- Parameters for Adabas Files
- Comparing Adabas Files in Batch Mode