Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Save Save File Data (SAVSAVFDTA) command saves the contents of a save file to tape or optical media. This command saves the save data in the save file to the device in a way that allows you to restore objects directly from the device.
A save file containing data created by the Save Licensed Program (SAVLICPGM) command cannot be saved by this command.
The information written on media by this command is similar to the data that was previously written to the save file by the save command that originally created the save file data. This includes the object descriptions, and object contents that existed when the original save operation was done.
This command uses only the save file and device description objects; it does not refer to or modify the description or contents of the objects included in the file save data. Thus, objects included in the save file are not locked during the running of this command, and the save history information (date, place, and time when each object was last saved) is not updated by this command for each object in the save file.
The description of the save file is not included in the save operation (unless it was included with the objects that were saved to create the save data in the file). In addition, this command does not update the save history information for the save file object, so the last save operation date, time, and place always identify the last save operation of the save file object description, not its contents.
Note: This command ignores all file overrides currently in effect for the job, except for the output file.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
SAVF | Save file | Qualified object name | Required, Positional 1 |
Qualifier 1: Save file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
DEV | Device | Values (up to 4 repetitions): Name | Required, Positional 2 |
VOL | Volume identifier | Single values: *MOUNTED Other values (up to 75 repetitions): Character value |
Optional, Positional 3 |
SEQNBR | Sequence number | 1-16777215, *END | Optional |
ENDOPT | End of media option | *REWIND, *LEAVE, *UNLOAD | Optional |
OPTFILE | Optical file | Path name, * | Optional |
USEOPTBLK | Use optimum block | *YES, *NO | Optional |
CLEAR | Clear | *NONE, *ALL, *AFTER, *REPLACE | Optional |
EXPDATE | File expiration date | Date, *PERM | Optional |
COMPACT | Data compaction | *DEV, *NO | Optional |
OUTPUT | Output | *NONE, *PRINT, *OUTFILE | Optional |
OUTFILE | File to receive output | Qualified object name | Optional |
Qualifier 1: File to receive output | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OUTMBR | Output member options | Element list | Optional |
Element 1: Member to receive output | Name, *FIRST | ||
Element 2: Replace or add records | *REPLACE, *ADD |
Top |
Specifies the save file whose contents are to be saved.
Note: The save file must contain data written by a previous save command or an error message is sent, and its contents are not saved to media.
This is a required parameter.
Qualifier 1: Save file
Qualifier 2: Library
Top |
Specifies the name of the device used for the save operation. The device name must already be known on the system by a device description.
This is a required parameter.
Top |
Specifies the volume identifiers of the volumes, or the cartridge identifiers of tapes in a tape media library device, on which the data is saved. The volumes must be placed in the device in the same order as specified for this parameter.
Single values
Note: This value cannot be specified when using an optical media library device.
Other values (up to 75 repetitions)
Top |
Specifies, when tape is used, the sequence number to use as the starting point for the save operation.
Top |
Specifies the operation that is automatically done on the tape or optical volume after the save operation ends. If more than one volume is used, this parameter applies only to the last volume used; all other volumes are unloaded when the end of the volume is reached.
Note: This parameter is valid only if a tape or optical device name is specified for the DEV parameter. For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored.
Top |
Specifies the path name of the optical file that is used for the save operation, beginning with the root directory of the volume.
For more information on specifying path names, refer to "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Top |
Specifies whether or not the optimum block size is used for the save operation.
Note: Specifying USEOPTBLK(*YES) may result in a tape that can be duplicated only to a device that supports the same block size.
Top |
Specifies whether active data on the media is automatically cleared or replaced. Active data is any file on the media that has not expired. For saves to tape, clearing active data will make any files on the tape volume beyond the last file written by the save operation no longer accessible. For saves to optical, the files written by the save operation can be automatically replaced while other files on the volume remain active, or all active files can be automatically cleared. Clearing does not erase the data, it just makes the files no longer accessible.
Notes:
If tapes are used and a sequence number is specified for the SEQNBR parameter, the first tape is cleared beginning at that sequence number. All tapes following that first tape are completely cleared. To clear the entire first tape, SEQNBR(1) must be specified.
Top |
Specifies the expiration date of the file created by the save operation. If a date is specified, the file is protected and cannot be overwritten until the specified expiration date.
Notes:
Top |
Specifies whether device data compaction is performed.
Top |
Specifies whether a list with information about the saved objects is created. The information can be printed with the job's spooled output or directed to a database file.
Note: You must specify a database file name for the File to receive output (OUTFILE) parameter when OUTPUT(*OUTFILE) is specified.
Top |
Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.
Qualifier 1: File to receive output
Qualifier 2: Library
Note: If a new file is created, the system uses the IBM-supplied file QASAVOBJ with format name QSRSAV as a model.
Top |
Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the Output (OUTPUT) parameter.
Element 1: Member to receive output
If the member exists, you can add records to the end of the existing member or clear the existing member and add the records.
Element 2: Replace or add records
Top |
SAVSAVFDTA SAVF(ONLINE) DEV(TAP01) SEQNBR(1) CLEAR(*ALL)
This command saves the contents of save file ONLINE to the first file on the tape volume on device TAP01. Files that have not ended on either the first tape volume or on subsequent volumes are overwritten without an inquiry message because CLEAR(*ALL) is specified.
Top |
*ESCAPE Messages
Top |