Adapt References to Copy Codes and Data Areas

#### Search Results

Search

# Adapt References to Copy Codes and Data Areas

If the database or file number of a user system file is changed by an Adabas utility or if a program using copy codes or data areas has been copied to a different environment, the references to copy codes and data areas in the XRef data still point to the environment used for compilation.

This function adapts the references so that the XRef data look as if the programs were cataloged in the new environment. It also checks whether the data areas or copy codes exist in the new location and if it can uniquely identify the object by which the old reference should be replaced.

The Adapt References to Copy Codes and Data Areas function is invoked with code C in the Special Functions menu or with the command `SPECIAL ADAPT`.

    18:24:01             *****  P R E D I C T  *****                     2009-07-31
    Plan   0             - Adapt references to resources -

    Old location of resources                   New location of resources
      Database number .........                   Database number ......
      File number .............                   File number ..........
      Library ................. *                 Library .............. *
      Member ..................                   Password .............
      Member of type .........*                   Cipher code ..........

    Location of using objects
      Database number .........
      File number .............
      Library ................. *

    With update (Y), only listing (N) 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

| Warning: This function can destroy large amounts of data. We strongly recommend to make this function available to the DBA only. Furthermore, user exits are not possible for this function.

Notes:

1. It is possible that a large number of records is read and updated with this function. We therefore recommend running it in batch mode. See Adapt References to Copy Codes and Data Areas in Batch Mode
2. If a database and/or file number has been changed, the special function Reposition Implementation Data must also be executed.

Parameters
Old location of resources
Database number | Old database number (source).
File number | Old file numbers (source).
Library | Old library name (source). Asterisk notation is possible.
Member | You may restrict the adaptation to a specific member. Asterisk notation is possible.
Member of type | You may restrict the adaptation to copy codes (enter C) or data areas (enter B) only. Leave blank if you want both member types adapted.
New location of resources
Database number | Database number of the target environment.
File number | File number of the target environment.
Note Data areas are searched in the new environment based on the existence of XRef data. Copy codes are searched based on the source code in the system file. If no database or file number is specified, the current system files are used.
Library | New target library name. Asterisk notation is possible.
Password | Password of the system file.
Cipher code | Cipher code of the system file.
Location of using objects
Database number | Enter a database number.
File number | Enter a file number.
Library | Library name. Asterisk notation is possible.
Note The adaptation of references is only applied to objects in this environment. If the old location refers to a library that was used as steplib during compilation, the location of the using objects may be different to the new location.
Processing options
With update (Y), only listing (N) | N (No) The references are only listed. Y (Yes) The references will be updated. Default for online mode is N. Default for batch mode is Y to be upward compatible with former Predict versions.

This section covers the following topics:

- Adapt References to Copy Codes and Data Areas in Batch Mode

## Adapt References to Copy Codes and Data Areas in Batch Mode

This function can also be executed in batch mode with the command `SPECIAL ADAPT`.

Parameters for the `SPECIAL ADAPT` command can be entered in positional or keyword form. The table below gives a list of keywords, the corresponding field in the Adapt references to copy codes and data areas screen and the relative position of the keywords.

Keyword | Field | Position
--- | --- | ---
OLD-DBNR | Database number (source) | 01
OLD-FNR | File number (source) | 02
OLD-LIB | Library (source) | 03
OLD-MEM | Member (source) | 04
OLD-TYPE | Member of type (source) | 05
NEW-DBNR | Database number | 06
NEW-FNR | File number | 07
NEW-LIB | Library | 08
USING-DBNR | Database number | 09
USING-FNR | File number | 10
USING-LIB | Library | 11
UPDATE | Update | 12