How can I save and restore spool file data as part of my backup/recovery process?
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
i5/OS spool support is just a collection files, members and data records. Output queues contain spool file entries that are pointers to this file system. Therefore, spool files are not individual objects that can be saved like other objects on the system. Any save/restore process prior to V5R4 of OS/400 is unable to restore spool file data and maintain the original user job attributes. Once a spool file is restored, the original user won't be able to access it using the WRKSPLF *CURRENT command.
IBM's BRMS product has implemented a solution that allows you to archive spool file data, search for these archived spool files based on several spool file attributes and recreate the spool file.
Work with Saved Spooled Files (WRKSPLFBRM)
Type choices, press Enter.
Output queue . . . . . . . . . . OUTQ *ALL Library . . . . . . . . . . . *ALL Auxiliary storage pool . . . . . ASP *ALL File . . . . . . . . . . . . . . FILE *ALL Job name . . . . . . . . . . . . JOB *ALL User . . . . . . . . . . . . . . USER *ALL User data . . . . . . . . . . . USRDTA *ALL Select dates: SLTDATE From date . . . . . . . . . . *BEGIN To date . . . . . . . . . . . *END Save status . . . . . . . . . . SAVSTS *ALL Sequence option . . . . . . . . SORT *DATE From system . . . . . . . . . . FROMSYS *LCL Output . . . . . . . . . . . . . OUTPUT *
Again, this archive is just a 'copy' of the spool files data along with certain format related attributes. Any restore (actually recreation) of the spool file will still result in the loss of original job related attributes.
The latest release of OS/400 (V5R4) does contain a new feature that allows you to save an *OUTQ and the spool file data referenced by it. This new functionality has also been integrated into the latest release of BRMS. This native operating system enhancement only allows saves of entire output queues and can't be used to save individual spool files. Again the BRMS product comes to the rescue. Even though you can only save whole output queues, BRMS provides an interface that lets you find and restore individual spool files back into the same output queue they were saved from. Along with the new spool file save capability there are a couple of new printer file attributes:
Expiration date for file (EXPDATE)
Specifies the expiration date for the spooled file. The spooled file will expire at 23:59:59, system local time on the date specified.
The expiration date does not change.
No expiration date is specified.
The expiration date is to be calculated using the value specified for the
Specify the date after which the spooled file will be eligible for removal from the system by the Delete Expired Spooled Files (DLTEXPSPLF) command. The date must be enclosed in apostrophes if date separator characters are used in the value.
Days until file expires (DAYS)
Specifies the number of days to keep the spooled file.
Note: A value must be specified for this parameter if the Expiration date for file (EXPDATE) parameter has a value of *DAYS. If the EXPDATE parameter has a value other than *DAYS, no value is allowed for this parameter.
Specify an interval in days after which the spooled file will be eligible for removal from the system by the Delete Expired Spooled Files (DLTEXPSPLF) command. The actual expiration date applied to the spooled file is calculated by adding the number of days specified to the date this command is executed.
The DLTEXPSPLF command has been added to V5R4. It will evaluate the spool files on the system and delete them when they have expired.
The following command can be used to create a job schedule entry which causes the DLTEXPSPLF command to delete all expired spooled files on your system every day:
ADDJOBSCDE JOB(DLTEXPSPLF) CMD(DLTEXPSPLF ASPDEV(*ALL)) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(010000) JOBQ(QSYS/QSYSNOMAX) TEXT('DELETE EXPIRED SPOOLED FILES SCHEDULE ENTRY')
It took 30 years, but IBM finally has the System Administrator in a good way to manage system spool files. Good job IBM!
How do I know if I have completely saved my system?
There is a great toolset available for purchase called TAATOOL. It contains a command called CHKSAV that will check to see if you have saved all the libraries on your system! If you aren't able to acquire this set of tools, you could create something that might suffice using the DSPOBJD command to display information for all the libraries on your system to an OUTFILE and then query this file for "SAVE Date / SAVE Time / SAVE Command" etc...
Example: DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*LIB) OUTPUT(*OUTFILE) OUTFILE(QTEMP/XX)
runqry *none xx
You will then see all the information available to you. You will probably want to select the following fields for a report:
Display Display Object Object Date Time Type 051605 111141 MyLib *LIB Save Save Save Save Saved Date Time Command Device Volume 051505 212320 SAVLIB Tape E00140
Your auditors will then be able to see when each library on your system was saved, which SAV command was used and what tape volume this library was saved to. Of course, my favorite backup/recovery product IBM's BRMS, provides a set of comprehensive reports that show what is saved but more importantly what hasn't been saved on your system. Along with these reports is the system recovery report that provides step-by-step instructions on how to completely recover your system in the event of a catastrophic disaster.
Dig Deeper on Data backup, storage and retrieval on iSeries
Related Q&A from Ken Graap
Find out if log files can be omitted during a save without causing problems in a full restore.continue reading
IBM's iSeries Backup and Recovery manual answers many questions related to system backup and disaster recovery.continue reading
The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.