Previous Topic: SET StatementsNext Topic: PATH-GROUP Statements


LOGICAL RECORD Statements

LOGICAL RECORD statements define a logical record that programs using the subschema can access.

A logical record is defined by naming the logical record and all the subschema records that participate in it; these subschema records are known as logical-record elements. The records must participate in the subschema (through ADD RECORD statements) before they can be named as logical record elements in the LOGICAL RECORD statement.

When a DML processor copies a logical-record description into a program, each logical-record element is subordinate to the logical record itself. The sequence of logical-record elements in the copied description is the same as that in DDL LOGICAL RECORD statement. If a subschema record occurs more than once in a single logical record, the additional occurrences must be assigned unique identifiers called roles.

The subschema compiler applies LOGICAL RECORD statements to the current subschema.

Note: For more information about creating logical records, refer to the CA IDMS Logical Record Facility Guide document.

Procedure

  1. Name the logical record
  2. Name the records that are components of this logical record
  3. Optionally specify error information
  4. Optionally include comments

Example

The following example shows the definition of the logical records MANAGER-STAFF and DEPT-ROSTER.

add lr name is manager-staff
  elements are employee
               structure
               employee role name is staff.
add lr name is dept-roster
  elements are department
               employee role name is staff.