Command reference / save

SAVSYS

Save System

The Save System (SAVSYS) command saves a copy of the Licensed Internal Code and the QSYS library in a format compatible with the installation of the operating system. It does not save objects from any other library. In addition, it saves security and configuration objects that can also be saved using the Save Security Data (SAVSECDTA) and Save Configuration (SAVCFG) commands. To save the system data on offline storage, the system writes a copy of the objects onto the media. The libraries and objects are not affected on the system. This command cannot be used to free any space occupied by these objects. The history information for the data area QSAVUSRPRF in QSYS is updated with the date, time, and place where user profiles are saved. The history information for the data area QSAVSYS in QSYS is updated with the date, time, and place where the system is saved. The history information for the data area QSAVCFG in QSYS is updated with the date, time, and place where configuration objects are saved. The history information is not updated for the individual objects. To display the information in these data areas, run the Display Object Description (DSPOBJD) command, and specify DETAIL(*FULL). Save the information from the display of QSAVUSRPRF for the location where the user profiles are saved. When using this command, it is important to use the device on the system that is defined as the initial program load (IPL) device. The IPL device was defined by the service representative when the system was installed. If an IPL device is not used when using this command, then the system cannot be restored using the SAVSYS media (if densities or media types are incompatible).

Allowed environments: *ALL. Positional parameters: 2.

Restrictions

Parameters

DEV Device

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.

Type
*NAME
Required
Yes
Length
10
List limit
4
Case
Uppercase
optical-device-name
Specify the name of the optical device used for the save operation.
tape-media-library-device-name
Specify the name of the tape media library device used for the save operation.
tape-device-name
Specify the names of one or more tape devices used for the save operation. If a virtual tape device is used, it must be the only device specified. If multiple tape devices are used, they must have compatible media formats and their names must be specified in the order in which they are used. Using more than one tape device permits one tape volume to be rewound and unloaded while another tape device processes the next tape volume.

VOL Volume identifier

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.

Type
*CHAR
Required
No
Default
*MOUNTED
Length
50
List limit
75
Case
Uppercase

Suggested / special values: *MOUNTED

*MOUNTED
The data is saved on the volumes placed in the device. For a media library device, the volume to be used is the next cartridge in the category mounted by the Set Tape Category (SETTAPCGY) command. Note: This value cannot be specified when using an optical media library device.
character-value
Specify the identifiers of one or more volumes in the order in which they are placed in a device and used to save the data.

EXPDATE File expiration date

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.

Type
*DATE
Required
No
Default
*PERM
Case
Uppercase

Suggested / special values: *PERM

*PERM
The files are protected permanently.
date
Specify the date when protection for the files ends.

ENDOPT End of media option

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.

Type
*CHAR
Required
No
Default
*REWIND
Length
7
Case
Uppercase

Allowed values: *REWIND, *LEAVE, *UNLOAD

*REWIND
The tape is automatically rewound, but not unloaded, after the operation has ended.
*LEAVE
The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
*UNLOAD
The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.

USEOPTBLK Use optimum block

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. Note: Not all files will be saved with optimum block size.

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
The optimum block size supported by the device is used for Save commands. If the block size that is used is larger than a block size that is supported by all device types, then: Performance may improve. The tape file that is created is only compatible with a device that supports the block size used. Commands such as Duplicate Tape (DUPTAP) do not duplicate files unless the files are being duplicated to a device which supports the same block size that was used. The value for the DTACPR parameter is ignored.
*NO
The optimum block size supported by the device is not used. Save commands use the default block size supported by all device types. The tape volume can be duplicated to any media format using the Duplicate Tape (DUPTAP) command.

ASPDEV ASP device

Specifies the auxiliary storage pool (ASP) device from which private authorities are to be saved. The IBM i default is *ALLAVL.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *SYSBAS, *CURASPGRP

*ALLAVL
The private authorities from the system ASP (ASP number 1), all basic user ASPs (ASP numbers 2-32), and all available independent ASPs are saved.
*
The private authorities from the system ASP, all basic user ASPs, and, if the current thread has an ASP group, all independent ASPs in the ASP group are saved.
*SYSBAS
The private authorities from the system ASP and all basic user ASPs are saved.
*CURASPGRP
If the current thread has an ASP group, the private authorities from all independent ASPs in the ASP group are saved.
name
Specify the ASP device name from which private authorities are to be saved.

CLEAR Clear

Specifies whether active data on the media is automatically cleared or replaced. Active data is any file on the media that has not expired. Clearing active data removes all files from the volume. Replacing active data on optical media initializes the first volume, and replaces only the optical files created by this operation on any volumes after the first volume. Clearing a tape does not initialize it. You should initialize tapes to a standard label format before the save command is issued by using the Initialize Tape (INZTAP) command and specifying a value for the NEWVOL parameter. Clearing an optical volume does initialize it. If a volume that is not initialized is encountered during the save operation, an inquiry message is sent and an operator can initialize the volume.

Type
*CHAR
Required
No
Default
*NONE
Length
8
Case
Uppercase

Allowed values: *NONE, *ALL, *AFTER, *REPLACE

*NONE
None of the media is automatically cleared. If the save operation encounters active data on the first volume, an inquiry message is sent, allowing the operator to either end the save operation or clear the media. If the save operation encounters active data after the first volume, an inquiry message is sent, allowing the operator to either end the save operation, clear the tape, or replace the optical file.
*ALL
All of the media is automatically cleared.
*AFTER
All media after the first volume is automatically cleared. If the save operation encounters active data on the first tape, an inquiry message is sent, allowing the operator to either end the save operation or clear the media. If the save operation encounters the specified optical file on the first volume, an inquiry message is sent, allowing the operator to either end the save operation or replace the file.
*REPLACE
Active data on the media is automatically replaced. The first optical volume is initialized. Other optical volumes are not initialized. Tapes are automatically cleared in the same way as the *ALL value.

DTACPR Data compression

Specifies whether data compression is used. If the save is running while other jobs on the system are active and software compression is used, the overall system performance may be affected. Note: If *DEV is specified for both this parameter and the Data compaction (COMPACT) parameter, only device data compaction is performed if device data compaction is supported on the device. Otherwise, data compression is performed. If *YES is specified for this parameter and *DEV is specified for the COMPACT parameter, both device data compaction and device data compression are performed if supported on the device.

Type
*CHAR
Required
No
Default
*DEV
Length
7
Case
Uppercase

Allowed values: *DEV, *NO, *YES, *LOW, *MEDIUM, *HIGH, *ZLIB

*DEV
If the save is to tape and the target device supports compression, hardware compression is performed. Otherwise, no data compression is performed.
*NO
No data compression is performed.
*YES
If the save is to tape and the target device supports compression, hardware compression is performed. If compression is not supported, or if the save data is written to optical media or to a save file, software compression is performed. Low software compression is used for all devices except optical DVD, which uses medium software compression.
*LOW
If the save operation is to a save file or optical, software data compression is performed with the SNA algorithm. Low compression is usually faster and the compressed data is usually larger than if medium or high compression is used.
*MEDIUM
If the save operation is to a save file or optical, software data compression is performed with the TERSE algorithm. Medium compression is usually slower than low compression but faster than high compression. The compressed data is usually smaller than if low compression is used and larger than if high compression is used.
*HIGH
If the save operation is to a save file or optical, software data compression is performed with the LZ1 algorithm. High compression is usually slower and the compressed data is usually smaller than if low or medium compression is used.
*ZLIB
If the save operation is to a save file or optical, software data compression is performed using the ZLIB deflate algorithm.

COMPACT Data compaction

Specifies whether device data compaction is performed.

Type
*CHAR
Required
No
Default
*DEV
Length
4
Case
Uppercase

Allowed values: *DEV, *NO

*DEV
Device data compaction is performed if the data is saved to tape and all tape devices specified for the Device (DEV) parameter support the compaction feature. Note: If *DEV is specified for both the Data compression (DTACPR) parameter and this parameter, only device data compaction is performed if device data compaction is supported on the device. Otherwise, data compression is performed if supported on the device. If *YES is specified for the DTACPR parameter and *DEV is specified for this parameter, both device data compaction and device data compression are performed if supported on the device.
*NO
Device data compaction is not performed.

OUTPUT Output

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.

Type
*CHAR
Required
No
Default
*NONE
Length
8
Case
Uppercase

Allowed values: *NONE, *PRINT, *OUTFILE

*NONE
No output listing is created.
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Examples

SAVSYS DEV(TAP01) CLEAR(*ALL)

Tapes Cleared Automatically. This command saves licensed internal code, system objects, all user profiles (including private authority for objects), and all line, controller, and device descriptions. They are saved on the tape put on the TAP01 tape drive. Each uncleared tape is automatically cleared when it is encountered, and the save operation continues without operator intervention.

SAVSYS DEV(TAP01) VOL(ABCDE)

Operating Receives Message of Exceeded Storage Capacity. The system data is saved on the TAP01 tape drive, starting on the tape volume labeled ABCDE. If the save operation exceeds the storage capacity of one tape, a message requesting that another volume be put on the TAP01 tape drive is shown to the operator.

SAVSYS DEV(TAP01 TAP02)

Saving Data on Two Tape Drives in Alternating Order. The system data is saved on tape drives TAP01 and TAP02 in alternating order. If the save operation exceeds the storage capacity of two tapes, a message requesting that another volume be put on TAP01 is shown to the operator. The tapes are rewound at the completion of the save system operation.

IBM command documentation

Generated from os/cl/catalog/SAVSYS.json and os/cl/help/SAVSYS.json.