Recreation of I/O Module fails after a field has been deleted

Date: Archived
Product/Release: LANSA for Windows and LANSA for the AS/400 all Releases
Abstract: After deletion of a field from a file definition, the I/O module recompilation fails
Submitted By: LANSA Technical Support


This problem only occurs when a file exists that includes a virtual field which is derived from a real field (i.e no virtual code).

A file definition is created and the file is made operational. Later on, a field is deleted from the file definition and the file is submitted for recreation. The job then fails with the following error:

In LANSA for Windows:

Error E1031: Name ‘f' not found in struct/union X_DBM_FLDMAP
Error E1045: Subscript on non-array

In LANSA for the AS/400:

Although an RPG listing was requested when the job had been submitted, no listing is produced.

The joblog reports the following message:

Message . . . . : Program DC@P2121 encountered unexpected error
- use HELP for error details.
Program = DC@P2121 on library DC@PGMLIB, Error codes (refer to the
chapter listing program status codes in the RPG manual) were 00121 / 00000,
Statement = 9999999, MI/ODT number = 0561, Routine = *DETC, Number of
parms = 007, Message number = MCH0603, Message text =

The reason for this failure is that the deleted field is the real field on which the virtual extended definition was based.


Deleting the virtual field from the file definition will make the compilation of the file complete successfully.