Trying to compile a COBOL program can get errors IGYDS1066 and/or EGYPS2121-S for reasons that are not immediately apparent.
Release: All supported releases.
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:
The DML068 will then in turn cause the IGYDS1066 and/or EGYPS2121-S errors to be produced in the COBOL compile step.
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:
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.