Troubleshooting
Problem
Resolving The Problem
The following is a list of things to do to fix or clean up duplicate files without restoring QUSRSYS. It is recommended to have a good backup of QUSRSYS before starting cleanup. It is possible that restricted state may be needed to ensure there are no locks on the files in QUSRSYS when removing duplicate files.
Note: This issue is user induced when someone has performed a RSTLIB with ALWOBJDIF(*ALL) specified. The user must determine the best method for cleaning up the duplicate files. Involving IBM in this requires a consulting or RTS Hourly Billable Support agreement. For more information about having this work done under a RTS Hourly Billable Support agreement, refer to the following document:
IBM Power: Remote Technical Support (RTS) Hourly Billable Support for IBM i
The WRKF command can be used to display and manipulate the needed files.
You should do the following:
| 1. | Make a list of the logical files and what physical files they point to. |
| 2. | Look at the physical files and determine which ones have data. Make a note of those files. |
| 3. | If you have a good logical file pointing to a good physical file, there is no need to do anything. |
| 4. | If you have a good logical file pointing to a wrong physical file, you should do the following: o If the wrong physical file contains the data, delete the correct named file, and rename the wrong file to the correct file name (the logical file will follow the rename). o If the correct physical contains the data, type CLRPFM on the wrong file. Then copy the file of the correct physical file to the wrong physical file with the CPYF command. Delete the correct physical file, and rename the wrong physical file to the correct physical file name. |
| 5. | If you have a wrong logical file pointing to a good physical file, make a backup of a good logical file, delete the correctly named logical file, rename the wrong logical file to the correct name, and correct the description. |
| 6. | If you have a wrong logical file pointing to a wrong physical file, delete both files. |
Notes:
1. If there are duplicates of QAOK* files in QUSRSYS, refer to document -QMSF Jobs Fail with a CPI9A9C Errors with QAOK* Files
2. IBM Power: Remote Technical Support (RTS) Hourly Billable Support for IBM i
This document provides information on how to request IBM i billable support, for assistance with items outside the scope of the SWMA agreement.
insert into dupelib/mytable values (1),(2)
CREATE INDEX DUPELIB/MYINDEX ON DUPELIB/MYTABLE (COL1)
1
2
DROP TABLE DUPELIB/MYTABLE
CREATE TABLE DUPELIB/MYTABLE (COL1 CHAR )
insert into dupelib/mytable values ('a'),('b')
CREATE INDEX DUPELIB/MYINDEX ON DUPELIB/MYTABLE (COL1)
a
b
4) Now let's restore the previous version:
SAVLIB(DUPELIB)
DEV(*SAVF)
SAVF(DUPELIB/SAVF)
MBROPT(*NEW)
ALWOBJDIF(*ALL)
MYINDE0001 *FILE LF Old name MYINDEX in DUPELIB owned by KTRISKO
MYTABLE *FILE PF-DTA
MYTABL0001 *FILE PF-DTA Old name MYTABLE in DUPELIB owned by KTRISKO
COL1
1
2
COL1
a
b
Historical Number
N1019409
Was this topic helpful?
Document Information
Modified date:
08 July 2026
UID
nas8N1019409