First of all, the version 999 of the program must be exported via Source Transport Utility (IDUTSTRN) and then imported back as version 001.
For details about this utility, please see "
Source Transport Utility--Transport Applications in Source Form" section of CA Ideal documentation.
Then all the History versions (usually 997, 998 and 999) of the involved program must be deleted but it's a good practice (and strongly suggested) to export all these HIST versions (via IDUTSTRN) and archive them as a precaution
BEFORE deleting.
Another way to resolve the problem is exporting (via IDUTSTRN) versions 997 (HIST), 998 (HIST) and 999 (PROD), then re-importing them as versions 001, 002 and 003 respectively.
Next mark versions 001 and 002 to HIST again, and 003 to PROD. In this way there are still two levels available on-line to fall back quickly with a DUP command, as opposed to doing the re-import from archive.