Unless you're fortunate enough to have the BRMS licensed program, the system does not provide you with a way of backing up and restoring spooled files.
If you use the CPYSPLF command to copy the spooled file to a database file, you can back up the database file, but that doesn't work very well because you lose all of the spooled file's attributes, including the line spacing.
To solve these problems, I have created two utilities. One utility saves the data and attributes of a spooled file into user space. The other utility creates a new spooled file from the user space that the first utility created.
If you want to use these utilities to back up your spooled files, use the SPLF2US command to copy the spooled files to a user space and then back up the user space.
SPLF2US USRSPC(MYLIB/SPLF0001) FILE(QSYSPRT) +
JOB(123456/SCOTTK/DSP01) SPLNBR(*LAST)
SAVOBJ OBJ(SPLF0001) LIB(MYLIB) DEV(TAP01) OBJTYPE(*USRSPC)
When it's time to restore the spooled file, you can restore the user space from your backup tape and then create a new spooled file from that user space. The attributes and data in the spooled file will be restored to exactly what they were before you saved them.
RSTOBJ OBJ(SPLF0001) SAVLIB(MYLIB) DEV(TAP01) OBJTYPE(*USRSPC)
US2SPLF USRSPC(MYLIB/SPLF0001)
These utilities can also be used to create a duplicate of a spooled file by saving the data to a user space and restoring it immediately.
SPLF2US USRSPC(QTEMP/DUPSPLF) FILE(QSYSPRT) +
JOB(123456/SCOTTK/DSP01) SPLNBR(*LAST)
US2SPLF USRSPC(QTEMP/DUPSPLF)
You can download the source code for these utilities from http://www.iseriesnetwork.com/noderesources/code/clubtechcode/Splf2UsrSpc.zip .