Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The COZZI-Save Lib to Rolling SAVF (SAVROLLING) command saves a library to a save file using an incremental naming convention. Use this command to save "generations" of a library over time.
For example, every week you could save a library named CUSTDATA to a save file and place the save file in library MYBACKUP. Using this command, each time the CUSTDATA library is saved, a save file is created with a numeric suffix. For example, CUSTDATA, CUSTDATA1, CUSTDATA2... If MAXGEN(4) is specified, then save files with the following names could exist: CUSTDATA, CUSTDATA1, CUSTDATA2, CUSTDATA3. The SAVF without a suffix is the most rescent save. The next time the SAVROLLING command is run over the CUSTDATA library, the existing save files are bumped down, and the oldest save file is deleted. Save file CUSTDATA2 becomes CUSTDATA3, CUSTDATA1 becomes CUSTDATA3 and a fresh CUSTDATA SAVF is created, containing the most recent save image. The command is limited to 1, 10 or 100 generations (images). SAVROLLING can create a maximum number of save file images based on the library's name, as follows:
Library Name Max Backup Length Generations 10 1 9 10 <=8 100
If the maximum generations specified on the MAXGEN parameter exceeds the above limit, the max is used instead of the user-specified value.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
LIB | Library(s) to save | Values (up to 300 repetitions): Name | Required, Positional 1 |
SAVFLIB | Library for save file(s) | Name | Required, Positional 2 |
CRTLIB | Create SAVFLIB Library | *YES, *NO | Optional, Positional 3 |
TGTRLS | Target Release for save | Character value, *CURRENT, *PRV | Optional, Positional 4 |
MAXGEN | Maximum generations to keep | Integer, 3 | Optional, Positional 5 |
TEXT | Save file text (description) | Character value, *DFT, *BLANK | Optional, Positional 6 |
DTACPR | Compresssion | *DEV, *NO, *YES, *LOW, *MEDIUM, *HIGH | Optional, Positional 7 |
SAVACT | Save while active | *NO, *YES, *LIB, *SYNCLIB, *SYSDFN | Optional, Positional 8 |
SAVACTWAIT | Save active wait time | Element list | Optional, Positional 9 |
Element 1: Object locks | 0-99999, 120, *NOMAX | ||
Element 2: Pending record changes | 0-99999, *LOCKWAIT, *NOCMTBDY, *NOMAX | ||
Element 3: Other pending changes | 0-99999, *LOCKWAIT, *NOMAX | ||
SAVACTMSGQ | Save while active msg queue | Qualified object name | Optional, Positional 10 |
Qualifier 1: Save while active msg queue | Name, *NONE, *WRKSTN | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB |
Top |
Specifies the library name(s) to be saved. Up to 300 library names at a time may be saved to individual save files.
This is a required parameter.
You can specify 300 values for this parameter.
Top |
Specifies the library into which the SAVF (save files) are created.
This is a required parameter.
Top |
Specifies whether to create the SAVFLIB if it does not exist.
Top |
Specifies specify the target release for the SAVLIB operation.
Top |
Specifies the maximum number of generations to be retained. Once the maximum generations is reached, the highest numbered SAVF (save file) is deleted before the newest SAVLIB is performed. This is done so that the rolling effect of the save file names/generations can be accomplished prior to the save--allowing the most current version to always be named with generation sequence number 1.
Top |
Specifies the text description for the save file being created.
Top |
Top |
Specifies whether an object can be updated while it is being saved.
Note: If your system is in a restricted state and the SAVACT parameter is specified, the save operation is performed as if SAVACT(*NO) was specified.
Note: If you specify this value and you are saving many libraries, it can take a long time to reach a checkpoint for all of the objects and libraries in the save operation.
Top |
Specifies the amount of time to wait for an object that is in use, or for transactions with pending changes to reach a commit boundary, before continuing the save operation.
Element 1: Object locks
For each object that is in use, specifies the amount of time to wait for the object to become available. If an object remains in use for the specified time, the object is not saved.
Element 2: Pending record changes
For each group of objects that are checkpointed together, specifies the amount of time to wait for transactions with pending record changes to reach a commit boundary. The Save active (SAVACT) parameter determines which objects are checkpointed together. If 0 is specified, all objects being saved must be at commit boundaries. If any other value is specified, all objects that are journaled to the same journals as the objects being saved must reach commit boundaries. If a commit boundary is not reached in the specified time, the save operation is ended, unless the value *NOCMTBDY is specified.
If you restore an object that was saved with partial transactions, you cannot use the object until you apply or remove journal changes (APYJRNCHG or RMVJRNCHG command) to reach commit boundaries. You will need all journal receivers that contain information about the partial transactions to apply or remove the changes. Until you apply or remove the changes, any future save of that object will include the partial transactions, even if you do not specify *NOCMTBDY.
Element 3: Pending record changes
For each library, specifies the amount of time to wait for transactions with other pending changes to reach a commit boundary. Other pending changes include the following:
If a commit boundary is not reached for a library in the specified time, the library is not saved.
Top |
Specifies the message queue that the save operation uses to notify the user that the checkpoint processing for a library is complete. Specify QSYSOPR to have the messages routined to the System Operator (QSYSOPR) message queue. A separate message is sent for each library to be saved when the *SYSDFN or *LIB value is specified for the Save active (SAVACT) parameter. When *SYNCLIB is specified for the SAVACT parameter, one message is sent for all libraries in the save operation.
This parameter can be used to save the objects at a known, consistent boundary to avoid additional recovery procedures following a restore operation. Applications can be stopped until the checkpoint processing complete message is received.
Single Values
Qualifier 2: Library
Top |
Example 1: Simple Command Example
SAVROLLING LIB(CUSTDATA MYLIB) SAVFLIB(QGPL) MAXGEN(4)
This command saves library CUSTDATA and then MYLIB to save files named CUSTDATA1 and MYLIB1 in the QGPL library.
Top |
Top |