Midrange News for the IBM i Community


Save SPOOL File Published by: Bob Cozzi on 25 Jul 2012 view comments

SAVSPLF (Save SPOOL File)

The SAVSPLF command saves SPOOL files to the user-specified SPOOL file archive. The archive is a custom database file whose format is provided with COZTOOLS. The SPOOL file is saved to 1 or more records in the archive, depending on the size of the SPOOL file. Most SPOOL files occupy only 1 record, however SPOOL files that exceed the 16MB limit, will require more than one record in the archive. Each time a SPOOL file is saved, a new record is inserted into the SPOOL file archive. It is recommend that you centralize on one SPOOL file archive to make it easier to remember where your SPOOL files have been saved.

SPOOL files saved with the SAVSPLF command can be restored using the RSTSPLF command. SPOOL files are restored to a new SPOOL file--that is, the RSTSPLF command does not replace any existing SPOOL files upon restore; a new SPOOL file is created when a SPOOL file is restored.

Parameters

SPLFNAME - The name of the SPOOL file to be saved. This name can be a full name, generic or *ALL.

JOB - The standard 3-part JOB identification (job name) associated with the SPOOL file. The default value JOB(*) may be specified to indicate that the job running the SAVSPLF command is also the job that produced the SPOOL file being saved. In addition JOB(*ALL) may be specified. Use care when specifying the JOB parameter. In many situations JOB(*ALL) is appropriate. Remember when saving all the SPOOL files in a specific output queue, JOB(*ALL) may be required.

SPLNBR - The SPOOL file sequence number or one of the special values *LAST, *ONLY, or *ALL (*ANY is also support as a synonym for *ALL).

OUTQ - The name(s) of the output queues that are searched for the SPOOL files. Up to 300 output queue names may be searched or the default *ALL may be specified. Use care when specifying OUTQ(*ALL) with JOB(*ALL).

USER - The name(s) of the users whose SPOOL files are selected. The owner of the SPOOL file is compared to the user(s) specified here. There are three special values for this parameter:

  • *JOB - The user profile specified on the JOB parameter is used. If JOB(*ALL) is specified, then USER(*JOB) is the same as USER(*ALL).
  • *CURRENT - The user profile of the user running the command is used.
  • *ALL - The user profile is not used to filter the selection of SPOOL files that are saved. Use care when specifying JOB(*ALL) OUTQ(*ALL) USER(*ALL) as virtually every SPOOL file on the system will be saved to the SPOOL File Archive.

USRDTA - The list of SPOOL files is filtered by the User Data specified here. USRDTA(*ALL) may be specified to indicate that the user data is not filtered.

FORM - The list of SPOOL files is filtered by the FORM Type of the SPOOL file. FORM(*ALL) may be specified to indicate that the form type is not filtered.

ARCHIVE - The name of the database file that will receive the save image of the SPOOL file. USRSAVSPLF in QGPL is the default. If this file does not exist, it will be created using the format file COZSAVSPLF in COZTOOLS library.

 

Requirements:

  • IBM i v5.4 or later

The SAVSPLF command is part of the COZTOOLS software package available from COZZI PRODUCTIONS, INC. at cozTools.com

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS