Taming the Robot/REPORTS library
The Robot/REPORTS main library, RBTREPLIB, tends to grow over time. Two types of cleanup help to keep this growth under control—archiving and clearing history records.
Archiving recommendations
Help/Systems recommends that you run the short-term archive command daily to move reports from online to short-term storage and to delete any expired reports. Many customers run the long-term archive command somewhat less frequently—perhaps once a week—but you can run it more often, if you need to.
The command to run the archive process is:
RBTREPLIB/REPARCHIVE STAGE(xxxxxxxx)
You can select from the following values for the STAGE parameter:
- SHORTTERM. Robot/REPORTS moves reports from online to short-term storage.
- LONGTERM. Robot/REPORTS moves reports from short-term to long-term storage.
- EXPIRED. Robot/REPORTS deletes expired reports from the archive.
- BOTH. Robot/REPORTS runs short-term archiving immediately followed by long-term archiving, all in one job.
History recommendations
Robot/REPORTS also provides the REPCLRHIST command to remove history records. This command cleans up processing and access history for expired reports. Help/Systems recommends that you run this command before you run the REPARCHIVE command.
The command to clear history records is:
RBTREPLIB/REPCLRHIST REMOVE(N) DAYS_OLD(30)
Help/Systems recommends removing both processing and access history. You can set the “Days Old to Purge” parameter to any number. A good number to start with is 30 days.
Contributed by Kelly Malecha, Technical Consultant




