Running the Process to Merge Archived Spool Files

You can run the process using a JCL job or using a utility from an 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.

Using the command line utility

Use the following syntax from an command prompt:

MergeArchives SCAN|ARCH arch-spool-file-directory/directories directory-for-merged-spool-files

Where:

SCAN|ARCH
Use SCAN to specify a parent directory in which its sub-directories are scanned for possible spool files to merge, or use ARCH to specify a single directory in which only its contents are merged.
arch-spool-file-directory/directories
When using the SCAN parameter, specify a parent directory with sub-directories that each contain sets of archived spool files, or when using the ARCH parameter, specify a directory that contains a set of archived spool files.
directory-for-merged-spool-files
Specify the directory in which the merged spool files will reside. Merged versions of the JES spool control files 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 command reads the C:\spl-arc\2018111211042198 directory, and then creates a merged version of the archived spool files in a MERGE sub-directory of the current working directory.

MergeArchives ARCH C:\spl-arc\2018111211042198 MERGE