Previous Topic: DDDL GeneratorNext Topic: Developing a File of Control Statements


Overview

Without control statements

When operated without control statements, the DDDL Generator generates DDDL ADD statements for each unique program, file, and record name in the system of programs being processed. An ADD statement is generated for the first occurrence of each program, file, and record name. Subsequent occurrences are considered to be duplicates and are ignored. The version clause VERSION 01 is generated for each ADD statement.

With control statements

The DDDL Generator operates as described above unless the user supplies control statements. These statements alter the operation of the DDDL Generator as follows:

Parameter statement

This statement specifies override processing options such as suppressing a listing of generated statements.

VERSION statement

This statement specifies an alternative VERSION clause. If this statement is used for a run, the DDDL Generator adds the VERSION clause specified (instead of VERSION 01) to all generated ADD PROGRAM, ADD FILE, and ADD RECORD statements. If grouping-control statements (described below) specify synonyms, the VERSION clause specified is also added to generated SYNONYM clauses.

Grouping statement

This statement identifies files or records with synonymous or nonunique names. Synonymous names are different names that refer to definitions of the same file or record; a nonunique name is a single name that refers to the definitions of different files or records.

If a grouping statement identifying synonymous names for the same file or record is used for a run, the DDDL Generator generates an ADD statement for each different name and a SYNONYM clause within each ADD statement. The SYNONYM clause documents all other synonymous entities for which an ADD was generated during the run.

If a grouping statement identifying a nonunique name is used for a run, the DDDL Generator generates an ADD statement for each unique entity referred to by the name (instead of just for the first occurrence of the name).

Note that an ADD statement is always generated for the first occurrence of every file or record name. If the name appears in a grouping statement for the run, an ADD statement will be generated for the first occurrence of the name for each group defined. Additionally, an ADD statement is generated for the first occurrence of the name that is not described by any of the grouping statements.

Sample file of control statements

A file of control statements is illustrated below. The parameter statement is first and specifies override processing options for the run. Next, the VERSION statement specifies a VERSION clause to be added to generated statements.The rest of file consists of grouping statements.

DDDL Generator

Output from the DDDL Generator

Output from the DDDL Generator consists of a file of DDDL statements and a listing of the generated statements. For a breakdown of the DDDL clauses generated for each entity type, refer to the following table.

Use the output file to populate the dictionary

The output file can be input to the DDDL compiler to populate the data dictionary. Before being input to the compiler, this file can be edited. Editing considerations are presented later in this section.

DDDL statement

DDDL clauses

ADD FILE

VERSION LABELS ARE STANDARD/OMITTED RECORD SIZE RECORDING MODE BLOCK SIZE FILE NAME SYNONYM

ADD RECORD

(COBOL substatement)

VERSION LANGUAGE WITHIN FILE RECORD NAME SYNONYM level-n element-name REDEFINES OCCURS OCCURS DEPENDING ON ASCENDING/DESCENDING KEY INDEXED BY (for one item) PICTURE VALUE SIGN BLANK WHEN ZERO SYNCHRONIZED JUSTIFIED RIGHT

ADD PROGRAM

VERSION LANGUAGE ESTIMATED LINES PROGRAM CALLED INPUT/OUTPUT/I-O/EXTEND FILE ENTRY POINT RECORD USED REFERENCED/ MODIFIED ELEMENT REFERENCED/ MODIFIED