Creating DDMs

This section describes how to create a DDM by either copying DDMs or creating DDMs directly from the field definitions in a database.

Start of instruction setTo create a DDM from an Adabas database

  1. In the SYSDDM utility menu, enter the following:

    In the Code field, enter either function code E (Edit DDM) or G (Generate DDM from Adabas FDT).
    Leave the Name field empty.
    In the DBID and FNR fields, enter the ID and file number of the database to be accessed by the DDM you want to create (see also DDM Specification).

    For function E: An empty Edit DDM screen appears where you can enter field definitions as described in Using the DDM Editor.

    For function G: The DDM is generated automatically from the FDT (field definition table) defined for the specified database and the Edit DDM screen appears with all relevant field definitions.

  2. Depending on the function used, on the Edit DDM screen either enter the field definitions required (see Using the DDM Editor) or modify the field definitions generated from the FDT.

    When you are finished editing the DDM, check the source and press PF3.

    The SYSDDM utility menu appears.

  3. In the SYSDDM utility menu, enter the following:

    In the Name field, enter a valid DDM name (see also Object Naming Conventions in the Using Natural documentation). For function G, the Name field is preset to the default name FILE-file-number where file-number corresponds to the file number entered in the FNR field.
    In the Code field, enter function code C (Catalog DDM).

    The DDM is saved as a cataloged object in the specified database ID and system file. See also Cataloging a DDM.

Start of instruction setTo create a DDM from a VSAM file

  1. In the SYSDDM utility menu, specify the following:

    In the Code field, enter an E (see also Description of Functions).
    In the DDM Type field, enter a V.
    In the DBID and FNR fields, enter the ID and file number of the database assigned to VSAM, which is to be accessed by the DDM you want to create.
    For valid field entries, see DDM Specification.

    An empty Edit DDM screen appears.

  2. Enter the field definitions as described in Using the DDM Editor.

  3. Catalog the DDM as described in Catalog DDM in Natural for VSAM in the Database Management System Interfaces documentation.

Start of instruction setTo create a DDM from a DB2 or an SQL/DS table

  1. For DB2, proceed as described in Generate DDM from an SQL Table in the Database Management System Interfaces documentation.

    Or:
    For SQL/DS, proceed as described in Generate DDM from an SQL Table in the Database Management System Interfaces documentation.

  2. Catalog the DDM as described in Cataloging a DDM.

Start of instruction setTo copy single or multiple DDMs

  1. In the SYSDDM utility menu, specify the following:

    In the Code field, enter an M (see also Description of Functions).
    In the Name field, enter the name of the DDM (or a range of names) to be copied.
    In the DBID and FNR fields, enter the database ID and file number of the FDIC system file that contains the required DDM(s).
    For valid field entries, see DDM Specification.

    The Copy DDMs (via SYSMAIN) window appears.

  2. Specify the source and target environments for the DDM(s) to be copied as described in Processing DDMs in the SYSMAIN Utility documentation.

If you want to copy DDMs between different system files and/or hardware platforms, see also Maintaining DDMs in Different Environments.