Maintaining Your QRPLOBJ Library

Article ID: 58812

The i/OS has an interesting and somewhat troublesome capability to allow us to change production objects on the fly during production up-time. While this capability provides us with the capability to maintain an up-time of 24x7, replacing production programs and other production objects during uptime allows us to have multiple versions of a production program running simultaneously, which can certainly cause problems. Nevertheless, the capability exists and we use it.

When creating a program, the compiler commands allow you to specify a REPLACE parameter as in the following:

CRTCLPGM PGM(PAYLIB/PAY001P) REPLACE(*YES)

Here, if the PAY001P program already exists, it will be replaced by the new version. The old version of the program is renamed, and moved to the library QRPLOBJ. Those users currently using the replaced program, will continue to use the old version(in QRPLOBJ), until they exit from that program and release the resolved program pointer or log off. When they then call the program the next time, they will attach to the new version. So, the QRPLOBJ version of the object will typically be needed only for a matter of hours; until users are done using the program.

I have seen many systems that have several hundreds of replaced objects residing in the QRPLOBJ library. These objects are still usable; e.g. a CALL to a program residing in QRPLOBJ will still run as intended.

You can display the contents of the QRPLOBJ Library using the command DSPLIB QRPLOBJ. Here is an example. You will notice that the text of each object identifies the original object that was replaced by this object.


                                Display Library                                 
                                                                                
 Library  . . . . . . :   QRPLOBJ         Number of objects  . :   4            
 Type . . . . . . . . :   PROD            Library ASP number . :   1            
 Create authority . . :   *SYSVAL         Library ASP device . :   *SYSBAS      
                                          Library ASP group  . :   *SYSBAS      
                                                                                
 Type options, press Enter.                                                     
   5=Display full attributes   8=Display service attributes                     
                                                                                
 Opt  Object      Type      Attribute               Size  Text                  
      Q7D1D01504  *USRSPC                          20480  QTEMP/MYLIST       
      Q7D1D1A1EF  *USRSPC                          56480  QTEMP/MYLIST 
      Q7D1D0C533  *PGM                            128620  MYLIB/MYPGM1       
      Q7D1EDA99F  *PGM                            324560  MYLIB/PAYPGM13       
        

Maintaining the QRPLOBJ Library

The QRPLOBJ library is cleared when you IPL the machine. If you IPL only a few times a year, it is advisable to periodically delete old unused objects from QRPLOBJ. Review the objects in QRPLOBJ and delete the objects that are no longer in use. But, be careful. If you delete a program that is still in use, the job using the program will encounter a fatal error.

Be careful to not delete the QRPLOBJ version of one of your never ending programs. It is possible that a program running in QRPLOBJ will still be active after several months for a never-ending program.

You can display the creation date of each object in QRPLOBJ, and if the created date is several months ago, and it is not a part of one of your never-ending programs, you can feel pretty safe in deleting the object.

Some folks write a CL program to maintain QRPLOBJ. The program performs the following steps:

  1. DSPOBJD OBJ(QRPLOBJ/*ALL) OBJTYPE(*ALL) to an *OUTFILE
  2. RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE) get the current date
  3. Subtract 30 or 60 Days from the current date to get the removal date
  4. Read through the *OUTFILE, deleting any objects that are older than the removal date

ProVIP Sponsors

ProVIP Sponsors