One Save File from More than One Library
Published: March 26, 2008
I would like to place objects from several libraries in a save file. When I run a Save Library (SAVLIB) or Save Object (SAVOBJ) command that specifies more than one library, I receive message CPF3789: Only one library allowed with specified parameters. I really don't want a bunch of save files. Is there another way?
A save file can contain other save files, so here's a method you can try. To keep it simple, let's say you want to save the contents of two libraries--MYLIB1 and MYLIB2--to one save file--SOMELIB/SOMESAVF.
1. Create a save file for each library.
2. Use the appropriate SAVxxx command to load the save files.
SAVLIB LIB(MYLIB1) DEV(*SAVF) SAVF(SOMELIB/MYLIB1)
SAVLIB LIB(MYLIB2) DEV(*SAVF) SAVF(SOMELIB/MYLIB2)
3. Save the save files to the single save file.
SAVOBJ OBJ(MYLIB*) LIB(SOMELIB) DEV(*SAVF) +
Let's say you want to restore program object DOIT to some system. Here's what you'd have to do.
1. Create the individual save file if necessary.
2. Restore the objects from the single save file to the individual save file.
RSTOBJ OBJ(*ALL) SAVLIB(SOMELIB) DEV(*SAVF) +
3. Use the appropriate restore command to restore objects from the individual save file.
RSTOBJ OBJ(DOITC) SAVLIB(MYLIB1) DEV(*SAVF) OBJTYPE(*PGM)
Post this story to del.icio.us
Post this story to Digg
Post this story to Slashdot