Previous Topic: QUEUENext Topic: RECORD Statement


RECORD (REPORT/TRANSACTION)

Typically, record occurrences consist of groups of elements within a hierarchical structure required by a program or schema; however, records can also exist without elements, usually for documentation or planning purposes. When the user includes an element within a record, the DDDL compiler creates a record element and associates it with the named record. A record can have a maximum length of 32,767 characters.

RECORD statements establish and maintain record occurrences but do not directly relate records to elements; the RECORD ELEMENT and COBOL substatements that follow ADD RECORD or MODIFY RECORD statements establish and maintain record-element structures. These substatements are used as follows:

COBOL substatements can be followed by RECORD ELEMENT substatements to modify an existing record-element structure. Note, however, that if a COBOL substatement follows a RECORD ELEMENT substatement, the DDDL compiler creates a new record-element structure that replaces the structure associated with the RECORD ELEMENT substatement.

Additional substatements allow the user to rebuild and remove record elements and define restricted record-element structures (called views) for use within subschemas and files.

Optional RECORD statement clauses relate records to existing files, users, and other records. (Record occurrences can be related to programs by means of the RECORD COPIED clause of the PROGRAM statement and the DML precompilers.) The RECORD statement also supports comments, attribute/entity relationships, and record synonyms.

Note: If the keyword REPORT or TRANSACTION is used in place of RECORD, the DDDL compiler creates a special entity occurrence to document the report or transaction in the dictionary. These reports and transactions appear as distinct entity types on dictionary reports.