A lot of people were very happy when IBM finally introduced the ability to include SPOOL files on the SAVLIB/SAVOBJ commands. However, many backup procedures may not be backing up SPOOL files even if the new SPLFDTA(*ALL) parameter is specified.
Consider the following backup command:
SAVLIB LIB(*ALLUSR) DEV(&DEV) ENDOPT(*LEAVE) + CLEAR(*ALL) SPLFDTA(*ALL) + OMITLIB(Q* #* $*) OMITOBJ((*ALL *JRNRCV))
This is pretty standard. Save everything in all user libraries. Omit libraries that begin with the letter Q, pound sign or the dollar sign.
But along comes IBM i5 v5r4m0 and IBM includes the SPLFDTA keyword. So we add the SPLFDTA(*ALL) parameter to the above command and just assumed our SPOOL files are being saved.
They are probably not.
Most users, not all, but certainly most, define OUTPUT QUEUE objects objtype(*OUTQ) in library QUSRSYS, while others prefer QGPL. Since OMITLIB(Q*) is specified, these two libraries are NOT included in the save operation. Therefore the OUTQ's in those libraries are not saved. This makes SPLFDTA(*ALL) do virtually nothing for us.
The solution is simple, but perhaps not obvious; you certainly don't want to remove the OMITLIB(Q*) or you end up saving all that other, unwanted data. So the solution is to add a 2nd backup command, as follows:
SAVOBJ OBJ(*ALL) LIB(QGPL QUSRSYS) DEV(TAP01) + OBJTYPE(*OUTQ) ENDOPT(*REWIND) + SPLFDTA(*ALL)
This SAVOBJ command saves libraries QGPL and QUSRSYS to tape and includes the SPLFDTA(*ALL) parameter. The SPOOL files are saved at the end of the prior backup--separating them from it on the TAPE. This may be what you want. Since I only specify OBJTYPE(*OUTQ) only the SPOOL File data is saved along with the outq descriptions. So restoring them is as easy as a RSTOBJ command.
Be sure to add a ENDOPT(*LEAVE) keyword to your original SAVLIB *ALLUSR command, so that the tape stays where it belongs, and then include ENDOPT(*REWIND) on the SAVOBJ OBJTYPE(*OUTQ) command.