IMS datastores require two (2) description types. The first description type is the IMS database descriptor (DBD), which defines the structure of an IMS database. The second description type defines the layout of the individual segments within the database. Most often, the segment layouts are defined with a COBOL or PL/I copybooks.
For IMS, the segment DESCRIPTIONs must reference the database DESCRPTION.
The following diagram illustrates the DESCRIPTION to DATASTORE relationship for IMS databases.
Example
The following diagram is an example of how to relate a DESCRIPTION command to a DATASTORE command for an IMS database named DBD01. The DBD source is referenced in the DDNAME DBD01SRC.
This database contains three (3) segments SEG01, SEG02 and SEG03. The layouts of these segments are defined with COBOL copybooks referenced in the DDNAME SEG01SRC, SEG02SRC and SEG03SRC, respectively.
DESCRIPTION IMSDBD DD:DBD01SRC
AS DBD01;
DESCRIPTION COBOL DD:SEG01SRC
AS SEG01_DESC
FOR SEGMENT SEG01 IN DATABASE DBD01;
DESCRIPTION COBOL DD:SEG02SRC
AS SEG02_DESC
FOR SEGMENT SEG02 IN DATABASE DBD01;
DESCRIPTION COBOL DD:SEG03SRC
AS SEG03_DESC
FOR SEGMENT SEG03 IN DATABASE DBD01;
DATASTORE DBD01
OF IMSDB
AS DBD01_IN
DESCRIBED BY SEG01_DESC
SEG02_DESC
SEG03_DESC;