Using RGZPFM Efficiently and Automating the Process

DT_1980

Member
Hi,

Currently every month, we follow below steps manually to Purge data from six Physical files which have key fields (No logical attach to these files) and then use RGZPFM on each file to free up space on disk.

Step 1. Use SQL DELETE commands to delete data from physical files on the basis data selection (Give date range) one at a time.

Step 2. After deleting data from all six files, one at a time, we use RGZPFM command on each of the file to free up space.

QUESTIONS :

1. How can we automate this entire Purging & RGZPFM process ?

2. How can we make this Process run more efficiently ?

Currently, this manual deleting of records and RGZPFM takes 8-10 hrs time (with CPU utilization of around 46 %).

Your help will be appreciated. Thanking you in Advance.
 
How to delete records from the file based on date values supplied.

Enter your SQL DELETE commands into a source member.

CRTQMQRY to create a qmqry object
CL program for STRQMQRY, passing date parameters into the QMQRY
Or do same thing in RPG or RPGSQL
 
Or perhaps change the files to re-use deleted records which means you do not have to reorganize the files as the system will automatically use the space where records where deleted.
It may hit response/disk finds a bit but not as much as they reorgs do.
 
Back
Top