IDMS Access module continually recompiled DB005540 Dynamic recompile because of AM/db definition mismatch.
search cancel

IDMS Access module continually recompiled DB005540 Dynamic recompile because of AM/db definition mismatch.

book

Article ID: 264726

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

An IDMS Access module is continually being recompiled every time the program is called. The CV is getting many error messages like this:

DB005540  Dynamic recompile of  am_name because of AM/db definition mismatch

 

 

 

Environment

Release : 19.0

Cause

If  the DDLCATLOD area is not in update mode, then IDMS is unable to store a dynamically recompiled access module. We then have to constantly recompile the access module every time the program  is executed. 

In this case the DDLCATLOD area is in update mode but the program is doing an OPEN/FETCH/CLOSE and then issues a RELEASE.

Issuing a RELEASE ends the SQL session and any uncommitted work will be rolled out, including the recompiled access module.

So when IDMS encounters a mismatched access module, it will do a dynamic recompile, but because of the RELEASE it does not save the recompiled access module and instead it will be deleted at the end of the transaction. We then will constantly recompile the access module every time the program is called and a mismatch is encountered.

 

Resolution

To prevent the constant dynamic recompilation of the access module do one of the following:

  1. Recompile the access module using the ALTER ACCESS MODULE  command in OCF.

  2. Do not issue a RELEASE. This will prevent the rollback and the reload of the access module during that point in time. Whether or not a dynamic recompile happens, issuing a RELEASE will cause the AM to be reloaded and deleted each time the dialog is called. 

  3. Issue a COMMIT RELEASE instead of RELEASE. Although a commit is not necessary for a retrieval transaction, this will store the dynamic recompiled access module and the next time it is called, it not have to dynamically recompile the access module again. However, you'll need to analyze your application thread to see whether a COMMIT is appropriate.

Additional Information

See documentation section ALTER ACCESS MODULE, RELEASE and  COMMIT.