Saving and restoring spooled files

You can use the SPLFDTA parameter on the Save Library (SAVLIB), Save Object (SAVOBJ), Restore Library (RSTLIB), and Restore Object (RSTOBJ) CL commands to save and restore spooled files without losing the print fidelity, attributes, or identity of the spooled files.

To maintain 100% print fidelity when you restore saved spooled files, you must:

  • Save and restore all external resources within the libraries that they existed in when the spooled file was created.
  • Make sure that the user profile (spooled file owner) exists and has the appropriate authorities to all the external resources required for the spooled file to print, including integrated file system directories, true type font integrated file system files, font resource objects, overlays, form definitions, page definitions, page segments, and embedded object integrated file system files.
  • Make sure that the Resource Allocation Table (RAT) has the same fonts and linked fonts as when the spooled file was created. This is only necessary for those spooled files that use true type linked fonts.
  • Make sure that all of the true type fonts that are used by the spooled files are in the appropriate directories on your system.
  • Make sure that the environment variable QIBM_AFP_RESOURCES_PATH is set to the appropriate path for those spooled files that use embedded objects but were not directory qualified.
  • Restore all embedded objects used by spooled files into the same directories that they were in when the files were created.

When a spooled file is in the process of being saved or restored, another restore or save operation will be blocked. The blocked operation might fail to save or restore that spooled file. A diagnostic message will be issued when this occurs.

When a spooled file is restored, it is reattached to the original job if the original job still exists on the system. If the original job does not exist, then the spooled file is restored in a detached state. If the spooled file is restored in a detached state, it is possible to have more then one spooled file with the same fully qualified job name, spooled file name, and spooled file number. Under these conditions, access to the restored spooled file requires the user or application to include the job system name and spooled file creation date. This enables the operating system to select the correct spooled file.

The order of spooled files that you restore is determined mainly by attributes such as the status of the file and is not necessarily the order in which you restore them. For more information, see Order of spooled files on an output queue.

For information about the procedures that were used to save and restore spooled files before V5R4 of IBM® i, see Save spooled files in the Systems management topic collection.