Concepts of Comparison

#### Search Results

Search

# Concepts of Comparison

This document covers the following topics:

- Functional Scope

- Resetting the Modified after generation Flag

- Format of Reports Created by Comparison Functions

- Calling Comparison Functions

## Functional Scope

The following Predict objects and external objects can be compared:

Predict Object | External Object
--- | ---
File | DDM Adabas File DB2 Tables and Views Adabas Tables and Views Oracle Tables and Views
All Adabas files and databases in a network | Vista Translation Table
Database | Adabas Database DB2 Database
Storagespace | DB2 Storagegroup
Dataspace | DB2 Tablespace SQL/DS Dataspace

If comparison functions find differences between an external object and its corresponding documentation object, either the implementation or the documentation can be changed to restore consistency.

Actions to restore consistency are either performed by the Predict comparison function or have to be executed manually. The following actions can be executed by Predict comparison functions:

- Update
  Update documentation objects according to external objects.

- Reset
  Reset the Modified after generation flag for documentation objects that do not differ from corresponding external objects. See Resetting the Modified after generation Flag below.

The following actions must be executed manually:

- Generate
  Generate a new external object from the documentation object.

- Disconnect
  Disconnect the external object and the documentation object.

- Purge
  Purge the external object or the documentation object.

The Save Set option helps to create a list of members which have to be processed according to changes in the documentation of an information processing system. See Saving the Result of Comparison Functions in Sets.

## Resetting the Modified after generation Flag

The Modified after generation flag of Predict objects indicates if a Predict object has been changed after an external object was generated from it.

With Predict file objects of type A, separate Modified after generation flags are set for changes to file attributes and changes to the field list of the file.

If compare functions find that a Modified after generation flag is set for a Predict object that does not differ from the external object, the flag is reset.

Modified after generation flags are reset if the respective check options of the compare function are activated:

- When comparing Adabas files, the Modified after generation flags for file attributes and for field lists can be reset separately. Predict evaluates the check options File attributes and Fields.

- For all other object types, only one Modified after generation flag is set. All check options must be set to Y if the flag is to be reset.

## Format of Reports Created by Comparison Functions

When attributes of documentation and external objects differ, the attribute values of documentation objects are reported first and the information on external objects is indented and highlighted, together with a brief description of the difference.

    13:40:33             *****  P R E D I C T  *****             2007-05-31
                      - Compare DD Objects with Adabas Files -

    File ID ...... A-A                              PFnr ... 331
    Database ID .. PREDICT-TEST-DB                  PDBnr .. 188

             File attributes
               Maxisn .................... 667
                    Maxisn in database: 1289
               ISN reusage ............... Yes
                    ISN reusage in database: No
               User ISN .................. Yes
                    User ISN in database: No

## Calling Comparison Functions

When working online, comparison functions are called from type-specific Compare screens called with code C and an external object code in a Predict main menu or with the corresponding command. See table in the section Calling Comparison Functions with Commands.

The following topics are covered below:

- General Prerequisites for Comparison Functions

- Selecting Objects for Comparison Functions

- Check, List, Update and Save Options

- Saving the Result of Comparison Functions in Sets

- Calling Comparison Functions with Commands

### General Prerequisites for Comparison Functions

Predict objects and external objects to be compared must be connected. See the section Handling of External and Documentation Objects in this documentation.

Note
There is one exception: If Adabas Online Services are not installed, implemented Adabas files and Predict file objects of type A can be compared even if they are not connected.

A variety of Adabas attributes can only be compared if Adabas version 6 or above is used and Adabas Online Services are installed.

### Selecting Objects for Comparison Functions

Comparison functions can either be applied to individual objects or groups of objects which meet selection criteria. The selection criteria vary for the different object types and are described in detail with the respective object type.

### Check, List, Update and Save Options

When comparing external objects and Predict objects, the following options determine the scope of the operation:

- Check Options
  Determine how attributes are to be compared. If check options are not set, compare functions will not reset the Modified after generation flag. See Resetting the Modified after generation Flag.

- List Options
  Determine the scope of results of the comparison to be displayed.

- Update Options
  Determine which attributes of the Predict object are to be updated if differences were found.

- Save Option
  See Saving the Result of Comparison Functions in Sets below.

The options available depend on the object type. All options are described in detail with the respective object type later in this documentation.

### Saving the Result of Comparison Functions in Sets

The IDs of members reported by comparison functions can be saved in sets for further processing. The following rules apply:

- To save the set of members, set the Save set option to Y before executing the function.

- With comparison functions, sets are saved in the library that contains the objects they describe. Hence, executing one Predict comparison function may save sets of objects in more than one library.

- The sets saved in a library can be maintained. See Operate on Sets in the section LIST XREF for Natural in the Predict Reference documentation.

### Calling Comparison Functions with Commands

Comparison functions can be used both online and in batch mode.

The following table gives an overview of objects that can be compared, the codes to be entered in any Predict main menu and the corresponding command.

External Object Type | Code | Command
--- | --- | ---
Adabas Database | AD | `COMPARE ADA-DA`
Adabas File | AF | `COMPARE FDT`
Vista Translation Table | AT | `COMPARE VISTATAB`
DDM | DD | `COMPARE DDM`
Adabas Table/View | EQ | `COMPARE ESQ`
DB2 Database | D2 | `COMPARE DB2-DATABASE`
DB2 Storagegroup | SG | `COMPARE STORAGEGROUP`
DB2 Table/View | T2 | `COMPARE TABLE`
DB2 Tablespace or SQL/DBspace | TS | `COMPARE DB2-TABLESPACE`
Oracle Table/View | OT | `COMPARE ORACLE-TABLE`
Connx Dictionary | ZD | `COMPARE CONNX-ENTRY`

### On this page

- Functional Scope
- Resetting the Modified after generation Flag
- Format of Reports Created by Comparison Functions
- Calling Comparison Functions