The DESCRIPTION command defines the structures/layouts of source and target datastores and is used in conjunction with the DATASTORE command to associate a data structure/layout with a physical datastore. DESCRIPTION commands must be specified prior to any DATASTORE commands that reference fields within a DESCRIPTION structure/layout.
The structure/layout is usually specified through a reference to an external source such as a file containing a COBOL Copybook, DDL, etc or it may be specified "In Line" in the script itself.
DESCRIPTION <description_type> |COBOL|CSTRUCT|IMSDBD|DB2SQL|ORASQL|MSSQL|SQLDDL|XMLDTD|PL1
<file_name> | /+in line syntactically correct description on as many lines as required+/
AS <description_alias
[KEY IS <key1> [,<key2>...,<keyn>]]
[FOR SEGMENT <segment_name> IN DATABASE <dbname>]
[TOPIC <topic>]
[SUBJECT <subject>]
Keyword | Description |
---|---|
<description_type> | Specifies the type of structure / layout used to describe a datastore. Valid description_type values are:
|
<file_name> | Specifies the name of the physical file containing the datastore description. DD:<ddname>(<file_name>) In the z/OS environment, ddname is the name of the DD statement containing referencing a partitioned dataset (PDS) or library that references the file ./<directory_name>/<file_name> In a UNIX or Windows environment the directory_name references the appropriate "part type" type directory /+ in line+/ When the description is specified in-line the characters "/+" and "+/" mark the beginning and ending of the structure/layout specification which may span as many lines as required. |
AS <description_alias> |
Specifies the alias name of the description, may contain only dash (-) and underscore (_) separators. Used as qualifier when referencing field or column names in Apply Engine script and in DESCRIBED BY clause of DATASTORE command. The aliasMUST match the VSAMDD or short system name for VSAM files defined in CICS or the RECALIAS runtime parm from the Keyed File compare capture. In our example the VSAM files are EMPLOYEE and REVIEW. The description alias will also be used as the full or partial Topic name for Kafka JSON/AVRO target DATASTORE's. |
[KEY IS <key1> [,<key2>...,<keyn>]] |
Optional key columns specified for target relational datastores and <description_type> DB2SQL, ORASQL or MSSQL. Only needed when the Keys cannot be retrieved from the target database manager "catalog". They are required to perform VSAM and other Keyed file updates. One (1) or more key columns/fields (relational/VSAM) specified for target datastores used to perform an update. The type of update depends on the PROCESS command specified (CHANGE or INSERT). |
[FOR SEGMENT <segment_name>] IN DATABASE <dbname> |
Required ONLY for IMS datastore descriptions. This clause is used to associate the segments in an IMS database where <segment_name> corresponds to the SEGM statement in the IMS DBD file that describes the hierarchical structure of the IMS database. |
[TOPIC <topic>] |
Kafka DATASTORE only. Optional full or partial Kafka topic name that will be substituted for default source DESCRIPTION AS <description_alias>. |
[SUBJECT <subject>] |
Required when using Confluent Schema Registry, used to retrieve/maintain the AVRO schema in the Registry for the DESCRIPTION. The value chosen for SUBJECT may be made based on the capabilities of both monitoring and Kafka consumer tools that interact with the Confluent Schema Registry. The Confluent Control Center, for example, may require the SUBJECT to be the same as the TOPIC with the addition of "-value". |
Example 1: DB2 source table Definition using DDL also used to describe an AVRO formatted Kafka topic
DESCRIPTION DB2SQL /home/sqdata/DB2DDL/dept.ddl AS DEPT
TOPIC IVP_HR_DEPARTMENT
SUBJECT IVP_HR_DEPARTMENT-value;
Example 2: z/OS Sequential File Definition
DESCRIPTION COBOL DD:COBFILE(EMPLOYEE) AS EMPLOYEE;
Example 3: IMS Database Definition using an IMS DBD and Segment Definitions
DESCRIPTION IMSDBD DD:IMSDBD(IMSDBD01) AS IMSDBD01;
DESCRIPTION COBOL DD:IMSSEG(DEPT)
AS DEPT
FOR SEGMENT DEPT
IN DATABASE IMSDBD01;
DESCRIPTION COBOL DD:IMSSEG(EMPLOYEE)
AS EMPLOYEE
FOR SEGMENT EMPLOYEE
IN DATABASE IMSDBD01;
Example 4: Relational Table Definition using inline DDL
DESCRIPTION SQLDDL
/+
CREATE TABLE TEST (
FLD1 CHAR(10)
,FLD2 CHAR(10)
,FLD3 CHAR(10)
)
+/
AS EMPLOYEE;