SAVSYS (Save System)
Purpose
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 iSeries 400. It does not save objects from any other library. In addition, it saves the security and configuration objects that can also be saved using the SAVSECDTA and 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, specify 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).
Restrictions
- You must have *SAVSYS special authority to use this command.
- All subsystems must be inactive before the SAVSYS command can be specified. The End System (ENDSYS) or End Subsystem (ENDSBS) command can be used to make the subsystems inactive. You must have job control (*JOBCTL) authority to use the ENDSYS or the ENDSBS command.
- Tapes created using this command that will be used for installation should be initialized with a density that is supported by the current IPL tape unit. If this is not done, the current IPL tape will have to be changed to a tape device that supports the density of the created SAVSYS tapes before installation begins.
- Tapes created using the SAVSYS command should not be used for automatic installation.
- Specifying USEOPTBLK(*YES) may result in a tape that can be duplicated only to a device that supports the same block size.
Required Parameters
- DEV
- Specifies the names of the tape devices, optical device, or the name of the media library device used for the save system operation. Each device name must be known on the system by a device description. If multiple devices are specified, they must have compatible media formats.
If more than one tape device is used, specify the names of the devices in the order in which they are used. Up to four tape device names and one tape media library device name can be specified. When more than one tape volume is used, more than one tape device may be used so that one tape volume can be rewound and unloaded while another tape device is being processed.
Optional Parameters
- VOL
- Specifies the volume identifiers of the volumes, or the cartridge identifier of a tape in a tape media library device, on which the data is saved. The volumes must be placed in the device in the order specified on this parameter. More information on this parameter is in Commonly used parameters.
*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.
volume-identifier: Specify the identifiers of one or more volumes in the order they are placed in the device and used to save the system data.
- EXPDATE
- Specifies the expiration date. The files cannot be overwritten until the expiration date. The expiration date must be later than or equal to the current date.
*PERM: The files are permanently protected.
expiration-date: Specify the date when protection of the files ends.
- ENDOPT
- Specifies the operation that is automatically performed 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: For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored. *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.
- OMIT
- Specifies what data to omit from the save system operation.
*NONE: All of the security data and configuration data are included in the save system operation.
*CFG: All of the configuration data is omitted from the save system operation. Use the SAVCFG (Save Configuration) command to save just the configuration object information.
*SECDTA: All of the security data is omitted from the save system operation. Use the SAVSECDTA (Save Security Data) command to save just the system security data.
- 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. One label entry is created for each of the files on the media.
*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 on the OUTFILE parameter.
Note: If OUTPUT(*OUTFILE) is specified, specify the database file name on the OUTFILE parameter.
- OUTFILE
- Specifies the qualified name of the database file to which the information about the object is directed when *OUTFILE is specified on the OUTPUT parameter. If the file does not exist, this command creates a database file in the specified library. If a new file is created, the system uses QASAVOBJ in QSYS with the format name QSRSAV as a model.
The name of the database file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file to which the output of the command is directed when OUTPUT(*OUTFILE) is specified.
- OUTMBR
- Specifies the name of the database file member to which the output of the command is directed.
Element 1: Member to Receive Output
*FIRST: The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified on the OUTFILE parameter.
member-name: Specify the name of the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it. If the member exists, the user can add records to the end of the existing member or clear the existing member and add the records.
Element 2: Operation to Perform on Member
*REPLACE: The existing records in the specified database file member are replaced by the new records.
*ADD: The new records are added to the existing information in the specified database file member.
- 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.
Notes
- 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 on the NEWVOL parameter.
- Clearing an optical volume does initialize it. The first optical volume is always initialized.
- 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.
*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 volume, an inquiry message is sent, allowing the operator to either end the save operation or clear the media.
*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
- Specifies whether data compression is performed.
*DEV: If the tape device has the hardware compression feature installed, processing proceeds as if DTACPR(*YES) is specified. If the compression feature is not installed or if save data is written to a diskette or save file, processing proceeds as if DTACPR(*NO) is specified.
Note: If *DEV is specified on both the DTACPR parameter and the COMPACT parameter, only device data compaction is performed if compaction is supported on the device. Otherwise, data compression is performed if supported on the device. If *YES is specified on the DTACPR parameter and *DEV is specified on the COMPACT parameter, both device data compaction and device data compression are performed if supported on the device.
*NO: No data compression is performed.
*YES: If the target device has the hardware compression feature, hardware compression is performed. If the feature is not present, software compression is performed.
- COMPACT
- Specifies whether device data compaction is performed.
*DEV: Device data compaction is performed if the data is saved to tape and the target device supports the compaction feature.
Note: If *DEV is specified on both the DTACPR parameter and the COMPACT parameter, only device data compaction is performed if compaction is supported on the device. Otherwise, data compression is performed if supported on the device. If *YES is specified on the DTACPR parameter and *DEV is specified on the COMPACT parameter, both device data compaction and device data compression are performed if supported on the device.
*NO: Device data compaction is not performed.
- USEOPTBLK
- Specifies whether or not the optimum block size is used for the save operation.
*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.
If the target release value that is specified is earlier than V3R7M0 then the block size supported by all device types is used.
*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.
Note: Not all files will be saved with optimum block size. - ASPDEV
- Specifies the name of the auxiliary storage pool (ASP) device from which private authorities are saved.
*ALLAVL: The private authorities from the system ASP (ASP number 1), all basic user ASPs (ASP numbers 2-32), and all online 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.
auxiliary-storage-pool-device-name: Specify the name of the independent ASP device from which private authorities are saved.
Examples for SAVSYS
Example 1: Tapes Cleared Automatically
SAVSYS DEV(TAP01) CLEAR(*ALL)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.
Example 2: Operating Receives Message of Exceeded Storage Capacity
SAVSYS DEV(TAP01) VOL(ABCDE)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.
Example 3: Saving Data on Two Tape Drives in Alternating Order
SAVSYS DEV(TAP01 TAP02)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.
Error messages for SAVSYS
*ESCAPE Messages
- CPF2206
- User needs authority to do requested function on object.
- CPF3703
- &2 &1 in &3 not saved.
- CPF3709
- Tape devices do not support same densities.
- CPF372B
- Not all objects were saved.
- CPF3727
- Duplicate device &1 specified on device name list.
- CPF3728
- Device &1 specified with other devices.
- CPF3733
- &2 &1 in &3 previously damaged.
- CPF3735
- Storage limit exceeded for user profile &1.
- CPF3738
- Device &1 used for save or restore is damaged.
- CPF3767
- Device &1 not found.
- CPF3768
- Device &1 not valid for command.
- CPF3772
- SAVSYS completed. One or more objects not saved.
- CPF3785
- Not all subsystems ended.
- CPF3793
- Machine storage limit reached.
- CPF3794
- Save or restore operation ended unsuccessfully.
- CPF3797
- Objects from library &3 not saved. Save limit exceeded.
- CPF3798
- Installation &2 &1 in &3 not found.
- CPF384E
- USEOPTBLK(*YES) not valid for CD-ROM premastering.
- CPF3873
- Licensed program &1 option &2 release &4 not saved.
- CPF3894
- Cancel reply received for message &1.
- CPF9814
- Device &1 not found.
- CPF9833
- *CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9847
- Error occurred while closing file &1 in library &2.
- CPF9850
- Override of printer file &1 not allowed.
- CPF9851
- Overflow value for file &1 in &2 too small.
- CPF9860
- Error occurred during output file processing.
- CPFB8ED
- Device description &1 not correct for operation.