Configuring the MVSSPLHK Housekeeping Process

You can configure certain criteria of the MVSSPLHK housekeeping process. Refer to Sample Parameters File for a sample JCL file that contains some of the parameters listed below:
Parameter specification
You can either specify the parameters in-stream or in a configuration file:
SYSIN DD specifies that the parameters are in-stream.
CONFIGI DD DSN=<dataset> specifies the file in which the parameters are stored.
Output files
You can specify an indexed output file that lists all the files archived by the housekeeping process.
INDEXO DD DSN=<dataset> specifies the file in which a list of the archived files is stored.
You can view this file in ESMAC, or with the aid of a copybook (splhkarc.cpy for 5-digit job numbering, or splhkar7.cpy for 7-digit job numbering) you can read the file and output the details to a location of your choice.
Note: When you enable 7-digit job numbering, any existing <dataset> files must be converted to a new 7-digit format in order for them to continue recording a history of the spool files that have been archived. To convert the file, use the CONVERT.JCL file (which is located in the cpylib (Windows), or demo/esjcl (UNIX) sub-directory of your product installation directory), changing the data set names to suit your requirements. When run, it calls the MFHKHCOV utility (also supplied). Once converted, the data set will process both 5- and 7-digit job numbers.
A SYSPRINT file is also produced, which contains additional information about the housekeeping process. It specifies the parameters used, the archive locations, and the actions performed on each archived file.
A SYSOUT DD also displays a summary of the process, including its progress, and any errors displayed via the SYSERR DD.
All these files together provide a comprehensive audit trail for the housekeeping process.
The type of archiving to run
Select one of the following:
NONE
The spool clean-up is performed, but no files are archived.
DATA
The spool clean-up is performed, and only the spool data files are archived
FULL
The spool clean-up is performed, and all files are archived. They are moved to a new directory at the archive location, specified by the MF_SPOOL_ARCHIVE_LOC environment variable. The name of the directory consists of the date and time that the archive ran; a directory of this name should not already exist in order for the housekeeping to run.
FULL, ALL
As FULL.
FULL, HELD
The spool clean-up is performed, and only held data sets are archived.
Setting the retain period
You can specify the default retain period (in days) for the housekeeping process:
MAX-RETAIN-PERIOD 006
sets the default retain period to 6 days.
MFDBFH performance options for database-hosted catalog and spool housekeeping
To enable optimized I/O for database-hosted catalog and spool file housekeeping:
USE_DB_OPTIO Y

When optimized I/O is enabled, you can perform the bulk delete of SPLDSN records in a single database operation by setting:

USE_DB_OPTIO_BULK_DEL_DSN Y

When optimized I/O is enabled, you can perform the bulk delete of SPLJOB records in a single database operation by setting:

USE_DB_OPTIO_BULK_DEL_JOB Y

When all three optimized I/O options are enabled, you can also enable local disk processing, which downloads database-hosted spool files and the catalog onto disk and performs spool housekeeping on the local disk files, and updates the database spool files and catalog using a bulk delete operation:

USE_DISK_HK Y
When all three optimized I/O options and local disk processing are enabled, use this option to disable the read locks on the database spool files and catalog during the bulk delete operation:
DISABLE_LOCK_FOR_BULK_DELETE Y
Note: You can use an equals, space, or comma as the delimiter between the option and the value. Valid values to enable the option are "Y" and "y" or "N" and "n" to disable the option. The default value is "N".
Override the retain period for individual jobs
You can specify a retain period for individual jobs, overriding the default retain period.
JOB_KEEP XXX* 002
JOB_KEEP BCCRSD35 012
JOB_KEEP YYY*
sets the retain period for any job beginning with XXX to 2 days, sets the retain period for the BCCRSD35 job to 12 days, and keeps any jobs beginning with YYY indefinitely.
Override the retain period for jobs in a particular output dataset class
You can specify a retain period for jobs in a particular output data set class, overriding the default retain period.
CLASS A 003 Y
CLASS Z 999 N
sets the retain period for jobs within class A to 3 days, and any older than that are archived, and sets the retain period for jobs in class Z to 999 days (the maximum allowed), and any older than that are not archived.
Override the spool housekeeping run date/time
You can override the date and time that the housekeeping is due to run by setting an environment variable:
MF_SPOOL_HK_TESTDATE=YYYYMMDD
or by passing a parameter to MVSSPLHK when it is invoked:
EXEC PGM=MVSSPLHK,PARM='2014051510303002'
sets the spool housekeeping and archiving to run on 05/15/2014 10:30:30:02.
Note: Only the date portion of this parameter is used when determining the eligibility of a spool file for archiving and/or deleting. The time portion is used when constructing the archive folder name.
Prevent the removal of data sets from an active job
Time-expired, non-active data sets are usually removed from active jobs. To prevent this, include the parameter:
CLEAN-DS-FROM-ACTIVE N
Suppress the creation of profile files
When a data set is to be archived, a profile file (.PRO file) is created; the profile file contains the data set's attributes. This file enables you to view the data set in the Data File Editor, or to use another program to perform file operations upon it. If you do not require profile files for your archived data sets, you can suppress their creation using the following:
MF_SPOOL_HK_WRITE_PROFILES N
Tip: You can also use the MF_SPOOL_HK_WRITE_PROFILES=N environment variable to suppress the creation of profile files.

The following configuration options can be used to reduce the run time of the housekeeping process. It is recommended that a housekeeping run be performed with none of them in effect, after recovery from any system failure, and periodically to ensure the integrity of the spool subsystem. How often this is done depends on the throughput of your batch system.

Suppress the purge of orphaned SYSOUT records
By default, when regular housekeeping has completed, the SPLDSN file is scanned, searching for records for which there is no associated SPLJOB record. You can suppress this search by setting the following configuration option:
MF_SPOOL_HK_ORPHAN_PURGE N
Suppress the purge of old CATALOG records
By default, when regular housekeeping has completed, the CATALOG is scanned, searching for spool record entries older than the maximum retain date, which conform to the standard naming convention (e.g. Y2017.S0323.S083544.J0001000.D00001.SYSPRINT). You can suppress this search by setting the following configuration option:
MF_SPOOL_HK_CATALOG_PURGE N

Alternatively, you can extend this search to encompass ALL spool data sets, regardless of their name, by setting the configuration option:

MF_SPOOL_HK_CATALOG_PURGE A
Warning: If you choose to extend the search in this way, and have a large catalog, spool housekeeping run times will increase significantly.
Suppress the check for orphaned LEX records

By default, when regular housekeeping has completed, the spool data directory is scanned, searching for LEX files (used internally by the job submission and restart functions) for which there is no associated SPLJOB record. You can suppress this search using the following configuration option:

MF_SPOOL_HK_LEX_SCAN N
Tip: You can also use the MF_SPOOL_HK_LEX_SCAN=N environment variable to suppress the search.
Suppress the detail records on SYSPRINT
By default, every successful housekeeping action is reported on SYSPRINT, which can result in a very large report. You can suppress the detail records by using the following configuration option:
MF_SPOOL_HK_SYSPRINT_DETAIL N