Friday, March 28, 2008

Save one file from more than one library:

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.
CRTSAVF FILE(SOMELIB/MYLIB1)
CRTSAVF FILE(SOMELIB/MYLIB2)
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) +
SAVF(SOMELIB/SOMESAVF)
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.
CRTSAVF FILE(SOMELIB/MYLIB1)
2. Restore the objects from the single save file to the individual save file.
RSTOBJ OBJ(*ALL) SAVLIB(SOMELIB) DEV(*SAVF) +
SAVF(SOMELIB/SOMESAVF)
3. Use the appropriate restore command to restore objects from the individual save file.
RSTOBJ OBJ(DOITC) SAVLIB(MYLIB1) DEV(*SAVF) OBJTYPE(*PGM)
SAVF(SOMELIB/MYLIB1) RSTLIB(QTEMP)

No comments: