Running the Process to Merge Archived Spool Files

You can run the process using a JCL job or using a utility from an Enterprise Developer command prompt.

Using the JCL job

The JCL job MERGESPL.JCL is located in the cpylib sub-directory of your product installation folder. Configure the following parameters within the source code to suit your requirements, and then submit the job in the usual way:

ARCHIVE LOC
The location of a folder containing archived spool files. Use this option or the SCAN option to select the spool files to archive.
SCAN
A top-level directory, where each containing sub-directory is scanned for archived spool files. Use this option or the ARCHIVE option to select the spool files to archive.
MERGE LOC
The location in which all of the archived spool files identified by one of the two previous parameters are copied. Merged versions of the JES spool control files and catalog.dat are created in this location (all prefixed with M_), and it is the M_SPLJOB.DAT data file that you open in the Micro Focus Data File Editor to view the merged spool files.
Note: If the merge location already contains merged archive spool files, the existing control files (files prefixed M_) are amended to accommodate the new spool files.

Example:

The following JCL, scans the C:\spl-arc\ directory for sub-directories containing archived spool files. The files it finds are merged into the C:\spl-merge\Nov-18\ directory.

//MERGESPL JOB 'MERGE SPOOL ARCHIVES',CLASS=A,MSGCLASS=A
//**********************************************************************
//* Merge a spool archive into a merged archive
//**********************************************************************
//ARCHIVE  EXEC PGM=MERGESPL
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSERR   DD SYSOUT=*
//* SYSIN or CONFIGI dataset contains the program parameters
//SYSIN  DD *
* --------------------------------------------------------
*   MERGED SPOOL HOUSEKEEPING CONFIGURATION FILE    
* --------------------------------------------------------
*   ARCHIVE LOCATION - the archive to read
* --------------------------------------------------------
* ARCHIVE   LOC C:\ES_ERRORS\MERGED_ARCHIVES\SET_A\2018052611114975
* --------------------------------------------------------
* TOP LEVEL DIRECTORY TO SCAN
  SCAN      LOC C:\spl-arc\
* --------------------------------------------------------
*   MERGED ARCHIVE LOCATION - The location of the merged archive
* --------------------------------------------------------
  MERGE LOC C:\spl-merge\Nov-18\
/*
//
Tip: The ARCHIVE step in the above JCL could well be added as a new step at the end of your existing spool housekeeping job. Also, note how you can specify the merge parameters using a configuration file by using the CONFIGI parameter shown above.