Do everything from the foot of the main menu for the database involved, or beyond, via call qcmd.
The instructions below assume the library involved is AW4L. If not, use your library name instead of AW4L in the instructions below.
If the date or type or any other aspect of the last regen is unknown or uncertain, examine the data areas named ZZREGEN0-9. The last regen is documented always in ZZREGEN0. More on this later.
Regen menu opt 98, positively identify the CUSTddhhmm and FIEGddhhmm backup files. These were the original CUST and FIELG file before they were renamed. If BOTH these files do not exist, the last regen did not rebuild the database.
For safety,
while in the regen menu, take option 92 to archive the current
definition in case it is needed again. Name it FIEG999999 or any other name
you choose.
SCENERIO 1 -- LAST REGEN WAS A FULL REGEN, ie 2 files exist.
To be absolutely safe, backup or copy the entire library, or maybe just files CUST FIEL and FIELG at this point. Which of these you do (if any)determines how hard it will be to recover if the recovery goes wrong. EG, CUST data entered since the bad regen will be lost.
Delete all logical files over the CUST file by entering this command:
DLTDLF AW4L/CUST
Rename the physical CUST file (or delete it if you are brave enough) Rename it to CUST999999 or any other name you choose:
RNMOBJ AW4L/CUST *FILE CUST999999
or
DLTF AW4L/CUST
Rename the regen backup cust file back to the real cust file name: (you noted the name up above):
RNMOBJ AW4L/CUSTddhhmm *FILE CUST
Copy
the regen backup database layout over the user-changed one
currently in the FIEL file:
CPYF AW4L/FIEGddhhmm AW4L/FIEL MBROPT(*REPLACE)
Go to the regen menu and do a normal full regen.
Finished.
Last Updated May, 2005