The optional field description clause inserts text documenting field definitions into the CDD.
1 – Syntax Rules
o Use the text delimiters /* and */ without the keyword DESCRIPTION, and place the text immediately before the field description statement of the field you want to document. o You can use 8-bit characters in CDDL descriptions.
2 – Usage Notes
o This clause provides a way to associate text with a record description, providing a tool for documenting the sources of data and for describing the field structure of a record. DESCRIPTION text can also aid in establishing record definition conventions and standards. o You can also include comments in a CDDL source file by using the exclamation point (!) as a comment delimiter. Using the DESCRIPTION clause is preferable to including comment lines in the source file because DESCRIPTION text is stored directly in the CDD. CDDL/COPY_LIST copies DESCRIPTION clauses from template records, but does not copy comments preceded by an exclamation point. Also, you can display record-level DESCRIPTION text with DMU's LIST/ITEM=DESCRIPTION command. DMU's EXTRACT/RECORD command extracts record- and field-level DESCRIPTION text but does not extract comments preceded by an exclamation point.
3 – Example
The following example contains DESCRIPTION text of the record definition as a whole, and of the elementary field ID. DEFINE RECORD CDD$TOP.CORPORATE.EMPLOYEE_LIST DESCRIPTION /* This record contains the employee master list, and it is the source from which employee fields in other record descriptions are copied. */. EMPLOYEE STRUCTURE. /* An employee's ID number is his or her social security number. */ ID DATATYPE IS UNSIGNED NUMERIC SIZE IS 9 DIGITS. NAME STRUCTURE. LAST_NAME DATATYPE IS TEXT SIZE IS 15 CHARACTERS. FIRST_NAME DATATYPE IS TEXT SIZE IS 10 CHARACTERS. MIDDLE_INITIAL DATATYPE IS TEXT SIZE IS 1 CHARACTER. END NAME STRUCTURE. ADDRESS COPY FROM CDD$TOP.CORPORATE.ADDRESS_RECORD. DEPT_CODE DATATYPE IS UNSIGNED NUMERIC SIZE IS 3 DIGITS. END EMPLOYEE STRUCTURE. END EMPLOYEE_LIST RECORD.