Backing Up Spooled Files in V5R4

Article ID: 56935

Now that you are running or preparing to run V5R4, don't forget the goodies. V5R4 provides a native capability to save and restore spooled files. Previously, you had to build or buy your own program to create a savable/restorable version of a spooled file. While IBM provided some spooled file APIs to help you to create a savable version, these versions were not always completely restorable -- certain spooled file attributes were ignored.

V5R4's new capability does not miss any spooled file attributes and it provides an IBM-supported mechanism -- something that's been missing in even the best homegrown solution.

To accomplish the change, a new parameter called SPLFDTA has been added to the SAVLIB, SAVOBJ, RSTLIB, and RSTOBJ commands. Let's look at a few V5R4 examples of the save and restore commands as they relate to spooled files.

SAVLIB   LIB(TESTLIB)  DEV(TAP01)  SPLFDTA(*ALL)

This command saves the library named TESTLIB -- including all of the spooled files residing in any output queues in the TESTLIB library.

RSTLIB   SAVLIB(TESTLIB)   DEV(TAP01)  SPLFDTA(*NEW)

This command restores the library TESTLIB and any saved spooled files that do not currently exist in the library.

SAVOBJ OBJ(MYOUTQ) LIB(TESTLIB)  DEV(TAP01) OBJTYPE(*OUTQ) SPLFDTA(*ALL)

This command saves the output queue MYOUTQ in library TESTLIB with all of the spooled files in the output queue.

RSTOBJ OBJ(MYOUTQ) SAVLIB(TESTLIB)  DEV(TAP01) OBJTYPE(*OUTQ) SPLFDTA(*NEW)

This command restores the output queue MYOUTQ in library TESTLIB and in any saved spooled files that do not currently exist in the output queue.

Visit the IBM Information Center topic on saving and restoring spooled files.

ProVIP Sponsors

ProVIP Sponsors