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 the copybook SPLHKARC.CPY, you can read the file and output the details to a location of your choice.
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.
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 class
You can specify a retain period for jobs in a particular 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