This section describes how to create a DDM by either copying DDMs or creating DDMs directly from the field definitions in a database.
To create a DDM from an Adabas database
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
Screen.
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.
Depending on the function used, on the Edit DDM screen either enter the field definitions required (see Using the DDM Editor Screen) 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.
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.
To create a DDM from a VSAM file
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.
Enter the field definitions as described in Using the DDM Editor Screen.
Catalog the DDM as described in Catalog DDM in the Natural for VSAM documentation.
To create a DDM from a DB2 or an SQL/DS table
For DB2, proceed as described in Generate DDM from an SQL Table in the Natural for DB2 documentation.
Or:
For SQL/DS, proceed as described in
Generate DDM
from an SQL Table in the Natural for
SQL/DS documentation.
Catalog the DDM as described in Cataloging a DDM.
To copy single or multiple DDMs
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.
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.