Avoid Dynamic Recompiles of CA IDMS Access Modules
Article ID: 110103
IDMSIDMS - DatabaseIDMS - ADS
A message DB005540 may appear in the CA IDMS log to indicate that an Access Module (AM) has been recompiled. This should never occur in a production environment, as it indicates some change has occurred in the table definition or data area. that has occurred since the last time the AM was compiled.
Timestamps are used to record whenever changes occur to a table definition or an SQL data area. There is also a timestamp on an Access Module., The timestamp on the Access Module should always be more recent than the timestamps on the definition and data area. If it is not, there is the potential that the access path in the AM is not up to date.
Access Modules and time stamp considerations apply in all CA IDMS environments.
Whenever any part of a table definition or an SQL data area definition changes, the Access Modules (AMs) for any programs that access tables in that area should be proactively recompiled. If this is not done, errors will occur at run-time. Changes that can cause these errors to occur include but are not limited to:
1- Running an Unload / Reload or a Reorg to expand the page range of an SQL data area; or to make any other change to the area ()page size, etc); 2- Changing the table definition, such as adding or deleting a column; 3- adding or changing an index definition for a table (including changing the IBC of an index).
After making any changes to an SQL table or SQL data area definition, clients should proactively recompile any AMs that access the tables that are impacted by these changes.
If you are not certain which AMs access the table or area where the definition was changed, you can use the queries below to help identify them.
This query will identify all AMs when you know the name of a table that was changed: SELECT * FROM SYSTEM.AMDEP WHERE TABSCHEMA = '<schema-name>' AND TABLE = '<table-name>' ;
This query will identify all AMs when you know the name of an area that was changed: SELECT AM.NAME, AM.VERSION FROM SYSTEM.AMDEP AM, SYSTEM.TABLE TBL WHERE AM.TABSCHEMA = TBL.SCHEMA AND AM.TABLE = TBL.NAME AND TBL.SEGMENT = '<segment-name>' AND TBL.AREA = '<table-name>' ;
A Knowledge document on managing Access Modules can be found here: https://comm.support.ca.com/kb/managing-idms-sql-access-modules/kb000054361
A Knowledge document about migrating Access Modules from one environment to another can be found here: https://comm.support.ca.com/kb/migrate-sql-access-modules/kb000063650
Details on how SQL timestamps are stored can be found in thiis Knpowledge Document: https://comm.support.ca.com/kb/locating-and-understanding-sql-data-timestamp/kb000054497