IBM Support

Clearing QRPLOBJ without an IPL

Troubleshooting


Problem

This document provides information about safely deleting objects in the QRPLOBJ library without an IPL.

Resolving The Problem

Question: There are thousands of objects in the QRPLOBJ library. Is there a safe way to clear these out without an IPL?

Answer: There are some object types that are not locked when they are in use. Do not delete these. The known ones are:
  • *PGM
  • *SRVPGM
  • *CMD

If system APIs are used to access *USRSPC objects, the *USRSPC objects are locked.

If the resolve system pointer (RSLVSP) MI instruction is used to resolve to a user space the *USRSPC might not be locked, even when it is in use. Your application programmer should know if you are using *USRSPC objects in this way.

To delete some of the object types that are not locked, first review the creation dates of the object and then judge whether or not the object could be deleted. To get a list of all objects in the QRPLOBJ library, use the DSPOBJD command to an output file:
 
DSPOBJD OBJ(QRPLOBJ/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(QGPL/QRPLOBJOBJ)

Press the Enter key. Then, query the output file to look at the creation date.

To delete all objects that are a certain type, on the operating system command line, type the following:
 
RMVLNK OBJLNK('/QSYS.LIB/QRPLOBJ.LIB/*.FILE')
Press the Enter key.
NOTE: This command deletes all objects of type *FILE from the library QRPLOBJ.
To programmatically delete all *USRSPC objects for a specific owner follow the steps below:
Step 1:  Using the Run SQL Scripts tool, run the following SQL Statement:
WITH TEMPSPC (OBJNAME, OBJTYPE, OBJLIB) AS (
        SELECT OBJNAME,
               OBJTYPE,
               OBJLIB
            FROM TABLE (
                    QSYS2.OBJECT_STATISTICS('QRPLOBJ', '*USRSPC')
                )
            WHERE OBJOWNER = 'V6CASTIL' -- Specify the name of the User profile that owns the objects.
    )
    SELECT OBJNAME,
           OBJTYPE,
           OBJLIB,
           QSYS2.QCMDEXC('DLTUSRSPC USRSPC(' || OBJLIB || '/' || OBJNAME || ')') AS "Completion?"
        FROM TEMPSPC;
image-20240410075846-2
NOTE 1:  Specify the name of the user profile that owns the objects. In our sample, the owner of the user space objects is profile V6CASTIL
NOTE 2:  The SQL has no confirmation screen and will programmatically delete all objects that match the criteria.  
NOTE 3: '1' on the Completion column indicates that the DLTUSRSPC completed normally, a '-1' indicates the it failed. 
NOTE 3: The above SQL only works on Release R730 and above.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHAAA2","label":"Operating System"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0;7.2.0;7.3.0;7.4.0;7.5.0"}]

Historical Number

337452056

Document Information

Modified date:
10 April 2024

UID

nas8N1016108