IGYDS1066 and/or EGYPS2121-S error and DML068 when COPYing a record into a program
search cancel

IGYDS1066 and/or EGYPS2121-S error and DML068 when COPYing a record into a program

book

Article ID: 22827

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

Trying to compile a COBOL program can get errors IGYDS1066 and/or EGYPS2121-S for reasons that are not immediately apparent.

Environment

Release: All supported releases.

Cause

This can occur when the program attempts to utilize a synonym of a record which is not included in the program's subschema, but when the desired copy is not being correctly copied into the program.

When a record description is copied from IDD into a COBOL program, if the following are all true, then a DML068 will be issued by the IDMSDMLC pre-compiler:

  1. A program contains a COPY IDMS RECORD statement;
  2. The record in question is schema-owned (copied into a schema); and
  3. The record does not participate in the subschema specified in the schema section of the program.

The DML068 will then in turn cause the IGYDS1066 and/or EGYPS2121-S errors to be produced in the COBOL compile step. 

Resolution

In this situation, if the goal is to have the program utilize a non-schema-owned synonym of the record, the COPY IDMS RECORD statement must be coded in a way that causes such a synonym to be found and resolved by the pre-compile step. The default for the IDMSDMLC pre-compiler is that if no version is specified, Version Highest is used. So if the goal is for the program to include a copy of the record which is not schema-owned, do the following:

  1. Add a record synonym for this record to IDD, and ensure that synonym is not included in any schema. This will make sure the flag in the record is not set to indicate that it is schema-owned.
  2. Then there are two options to ensure that this synonym is the one copied by IDMSDMLC when it processes the COPY IDMS RECORD statement: 
    1. On the COPY IDMS RECORD statement, explicitly specify the record name and version of this non-schema-owned synonym (as created in step 1 above) OR
    2. The pre-compiler defaults to Version Highest. So when adding the non-schema-owned synonym to IDD in step 1, make certain that the version number is higher than the versions of any schema-owned synonyms for the record. Then the pre-compiler will automatically pull in that copy of the record since it will be the highest version defined.

This can also occur if the record in question was meant to be included in the subschema used by the program, but inadvertently was left out. To resolve that situation, modify the subschema (and schema if necessary) to include the desired record; then re-compile.

Additional Information