The SAVROLLING command save the library name(s) to save file with the same name as the library in a user-specified library. The save file name is based on the library name and a counter. For example, if library COZTOOLS is saved, a save file named COZTOOLS1 is created and the library is saved to it. The next time SAVROLLING is used to save the COZTOOLS library (to the same target location) the save file COZTOOLS1 is renamed to COZTOOLS2 and a the library is once again, saved to save file COZTOOLS1. This process repeats until the maximum generations limit is reached (the MAXGEN parameter).
SAVROLLING LIB(COZTOOLS ARLIB PAYROLL PRODDATA) SAVFLIB(ONLINEBKP) CRTLIB(*YES) MAXGEN(5)
In this example, the libraries COZTOOLS, APLIB, PAYROLL and PRODDATA are saved to save files COZTOOLS1, ARLIB1, PAYROLL1 and PRODDATA1 in the ONLINEBKP library. Each subsequent save will increment the save file names up to 3. For example:
SAVROLLING LIB(COZTOOLS ARLIB PAYROLL PRODDATA) SAVFLIB(ONLINEBKP) MAXGEN(5)
The save files named COZTOOLS1, ARLIB1, PAYROLL1 and PRODDATA1 are renamed to COZTOOLS2, ARLIB2, PAYROLL2 and PRODDATA2 respectively and the current content of those libraries is saved to save files named COZTOOLS1, ARLIB1, PAYROLL1, and PORDDATA1.
LIB - The names of the libraries to be saved. Up to 300 library names may be specified at one time. Each library is saved to a save file with the same name as the library plus a sequence number ("generation code"). If the library name is 10 characters long, it may not be saved using SAVROLLING. Use the SAVLIBSAVF command in COZTOOLS to save libraries with name of 10 characters in length. If the library name is 9 characters long it may be saved using SAVROLLING, however the MAXGEN parameter must be 9 or less or unpredictable results may occur.
SAVFLIB - The library where the save files are stored. The first part of this parameter is the name of a library into which the save files created by the command, are stored. The second part of the parameter indicates whether to create the library if it doesn't already exist. If *NO is specified and the library does not already exist, the command will fail. If *CREATE (or *YES) is specified, the library is created if it does not exist.
CRTLIB - Create the library specified on the SAVFLIB parameter, if necessary. If the library exists, no action is taken by this parameter, if the library does not exist, and CRTLIB(*YES) is specified, it is created. If CRTLIB(*NO) is specified and the library does not exist, a message is sent and the command is cancelled.
MAXGEN - The maximum number of generations of the save to keep. When the number of times the library is saved exceeds the value specified for this parameter, the save at the MAXGEN value is deleted before any other save operations are performed.
The SAVROLLING command is part of the COZTOOLS software package available at www.cozTools.com