Incorporating NDBs for IMS Databases/Segments

NDBs and UDFs of physical and logical IMS databases can be incorporated into the Predict data dictionary.

As a safeguard against accidental overwriting, an NDB will not be incorporated if the dictionary already contains a database incorporated from the same NDB. To change a database object of type I, use the Replace function (code R).

Note:
See Concepts of Incorporation for basic information on how to use incorporation functions.

This document covers the following topics:


Selecting Natural DBDs for IMS Databases and Segments

The Incorporate NDBs screen is displayed by selecting function code I and object code ND in a Predict main menu or by entering the direct command INCORPORATE NDB.

13:44:22             *****  P R E D I C T  *****             2007-05-31
Plan   0                    - Incorporate NDBs -





NDB name .......
Parameters
NDB name Name of the NDB. NDB names correspond to the name of IMS databases. Asterisk notation is allowed.

NDBs which meet this selection criterion are then listed as follows:

13:27:58             *****  P R E D I C T  *****             2007-05-31
                            - Incorporate NDBs -
Search-crit.:NDB name=ALL
                     Segment
Cmd NDB name NDB type Count Database ID                      Remark

__  ARTICLE  Physical    6  ARTICLE4
__  CUSTOMER Physical    3  CUSTOMER
__  ED00DBD  Physical    5  ED00DBD1
__  PARTLIST Logical     3  PARTLIST2
__  PARTUSED Logical     3  PARTUSED
__
Columns in the List
NDB name Name of the NDB corresponding to an IMS database.
NDB type Type of the IMS database: either Physical or Logical.
Segment count The number of segments in the IMS database.
Database ID The ID of a Predict database object documenting the NDB.
Remark After successful execution of the function: either Replaced or Incorporated.

Incorporating Natural DBDs for IMS Databases and Segments

Valid functions:

Incorporate - Code I

Scope of the Incorporation

  • A database object of type I is created for each NDB.

  • A Predict file object of type I is created for each segment of the NDB.

  • Predict file objects of type J are created if a segment has UDFs. If the segment contains a DBID and FNR (connection to the UDF) Predict checks whether a UDF is defined with this DBID and FNR and whether the DBID is defined in the NTDB macro as an IMS/DL/I database. If no corresponding UDF is defined, an error message is returned.

  • If the DBID does not correspond to an IMS/DL/I database, any UDF is incorporated with a warning message. The DBID and FNR remain unchanged.

  • If a corresponding UDF is defined, one or more files of type J containing all user defined fields are created.

Each time a redefinition is found, i.e., the offset of a field is equal to or less than the offset of a previous field, a new file of type J is created. Gaps between two user defined fields are filled with DUMMY fields.

Predict ensures that the Adabas short names of UDFs in logical child segments fall within the range allowed by Natural for DL/I. This range is documented in the DDA Services and should only be changed on special advice of SAG. DBID/FNR of the UDF are recorded in the generation log of the file of type I.

Before the Incorporate function is executed, specify the following parameters for each NDB in an additional input screen:

Incorporation Options
Segment name prefix The prefix to be concatenated both with the NDB name to create an ID for the Predict database object and with the name of each segment in the NDB to create an ID for the corresponding Predict file object of type I.
Segment name suffix The suffix to be concatenated both with the NDB name to create an ID for the Predict database object and with the name of each segment in the NDB to create an ID for the corresponding Predict file object of type I.
Layout name prefix The prefix to be concatenated with the name of each segment in the NDB that has user defined fields, to create an ID for the corresponding Predict file object of type J.
Layout name suffix The suffix to be concatenated with the name of each segment in the NDB that has user defined fields, to create an ID for the corresponding Predict file object of type J. If several layouts are created for one segment, a different number is added to the layout name suffix for each layout.
Field name prefix / suffix
How each segment name is to be concatenated with the name of each field in that segment (file of type I):
P as a prefix to the field name
S as a suffix to the field name.
Only for identical field names
Y Prefixes and suffixes are only used to distinguish between fields with identical names in the same NDB.
List incorporated code
Y The resulting definitions are to be displayed.
Standard comments
Y The first three abstract lines of each object incorporated (database, files and fields) will contain the name of the incorporated NDB and its date of incorporation.
N The incorporated Predict objects will contain no abstract.

Replace - Code R

Replaces Predict objects documenting NDBs.

Prerequisites and Restrictions

Predict objects documenting NDBs will be not be replaced in the following circumstances:

  • if a physical database is to replace a logical database or vice versa;

  • if a file of type I or a related file of type J or K for which a DDM exists is to be deleted and Natural Security does not allow the user to delete the DDM.

Scope of the Replace Operation

The Replace function creates, replaces and deletes Predict file objects. The following rules apply:

  • New Predict file objects will be created for all segments in the NDB that are not yet documented in Predict.

  • Existing Predict file objects are replaced if they document segments that are still used in the NDB. Changes to IMS fields and deletion of IMS fields are then rippled across all related files of types J and K that contain these fields. The following files will be marked as modified after generation after this rippling:

    • If the changed file represents a segment of a physical database:

      • the changed file and all its related files of types J and K;

      • Files of type I that depend on the changed file and all their related files of types J and K.

    • If the changed file represents a segment of a logical database:

      • the changed file and all files of types J and K that are related to the physical file of type I from which the changed file is derived;

      • Files of type I that depend on the changed file and all files of types J and K that are related to the physical files of type I from which these files of type I are derived.

  • Predict file objects documenting segments that are no longer contained in the NDB will be deleted. Whenever a file of type I is deleted, all related files of types J and K are also deleted. If DDMs have been generated from the files of type I, J and K, these files can only be purged if the user is authorized to modify the Natural Security definition of the files. This is only applicable if Natural Security is active. See Protecting DDMs in the section Protecting External Objects in Predict with Natural Security in the Predict Security documentation.

  • Files of type J are not replaced, even if the UDF has been changed.

Before the Replace function is executed, enter the following parameters for each NDB in an additional input screen:

Replace Options
Keep layout structure
When files of type I are replaced, changes in IMS fields are rippled across the layouts and userviews that contain them. Rippled changes to the offset and length of IMS fields in a file of type J and deletion of IMS fields from a file of type J can change the offset of fields later in a layout.
Y Predict either adjusts the length of DUMMY fields to cancel this effect or issues a warning that the effect cannot be cancelled.
List incorporated code
Y The resulting definitions are to be displayed.
Comments as abstract
Y The first three abstract lines of each object incorporated (database, files and fields) will contain the name of the incorporated NDB and its date of incorporation.
N The incorporated Predict objects will contain no abstract.
Before replacing any files of type I during an online session, Predict displays the file IDs together with the IDs of related files of types J and K. Confirm the deletions to continue processing.

Incorporating IMS Database in Batch Mode

Command: INCORPORATE NDB

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

Field / Code Keyword Position
NDB name NDB 1
I (incorp.) o. R (replace) SUB-FUNCTION 2
Segment name prefix SEGMENT-PREFIX 3
Segment name suffix SEGMENT-SUFFIX 4
Layout name prefix LAYOUT-PREFIX 5
Layout name suffix LAYOUT-SUFFIX 6
Field name prefix / suffix FIELD-NAME 7
Only identical field names ID-ONLY 8
List incorporated code LIST 9
Keep layout structure KEEP 10
Comments as abstract COMMENT 11
Delete DELETE 12

Note:
The keyword ABSTRACT can be used as a synonym for COMMENT.

Example

To incorporate the IMS-NDB of name TEST, code the command:

INCORPORATE NDB
NDB=TEST,SUB-FUNCTION=I

or (using positional parameters)

INCORPORATE NDB
TEST,I

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

Extra Parameter for Replacing an NDB in Batch Mode
DELETE
N If a file of type I is to be replaced, no changes are made to Predict; the IDs of the files of type I that should have been replaced are listed. The function can then be rerun with DELETE=Y.
This parameter is only available in batch mode. Default is Y.