A 2E Data Model will benefit from running regular housekeeping activities to ensure that it can be used efficiently and does not contain any integrity errors.
CA 2E 8.7 and higher
The housekeeping activities are:
YRGZMDL RGZOPT(*MDL)
With parameter RGZOPT(*MDL), this command reorganizes all the files in a data model and recovers space used by deleted records. It can also be run with parameter RGZOPT(*JOBLST) to reorganize data in the data model's job list file. For a model that is heavily used by a number of developers, it can be a good idea to run YRGZMDL RGZOPT(*JOBLST) overnight on a daily basis.
YCHKMDL ACTION(*UPDATE)
The YCHKMDL command with parameter ACTION(*UPDATE) checks the data model for inactive records in internal model files and unresolvable object references. These "dangling references" will be copied to backup files before being deleted and written to the Check Model Data report.
YCHKDTAMDL
The YCHKDTAMDL command checks the data model for integrity errors in fields, domains, relations and entries.
YCHKMDL ACTION(*ANALYZE)
The YCHKMDL command with parameter ACTION(*ANALYZE) checks every object in the data model. It checks all objects that use the object (usages) and all objects that it refers to (references). A report is produced showing any unresolved references that are encountered during this expansion. For example if a model object refers to an object that has been deleted from the model.