Save Save Files using BRM (SAVSAVFBRM)

The Save Save Files using BRM (SAVSAVFBRM) command transfers save files created during BRMS processing to media using the SAVSAVFDTA command.

Various parameters allow you to select which save files that you want to copy to media. For instance, you can select a range of save file creation dates to include in the save files that you want to copy to media with further qualification of control group and media class.

You can schedule the SAVSAVFBRM command through the system job scheduler, through another job scheduler or on demand.

Expired save files that are not waiting to be copied to tape are deleted when the SAVSAVFBRM command processes.

Data in a save file created with device *NONE will not be copied to media unless a device is specified on the Device (DEVICE) parameter when using this command.

Virtual media and devices can be used with this command. The following restrictions apply to the use of virtual media and virtual devices.

To use this command, you must have the Backup Recovery and Media Services for IBM i licensed program installed.

Restrictions:

  1. You must have authority to the SAVSAVFDTA command to use this command. The SAVSAVFBRM command does not support the transfer of saved file data to TSM (ADSM) media.
  2. This command should not be used by control group *EXIT item processing as results will be unpredictable.

You can save data to an optical device using this command. The following restrictions apply when using optical devices.

Parameters

Keyword Description Choices Notes
CTLGRP Control group Single values: *ALL
Other values (up to 50 repetitions): Generic name, name, *NONE, *ARCGRP, *BKUGRP, *SYSGRP, *SYSTEM
Optional
LIB Library Single values: *ALL
Other values (up to 50 repetitions): Generic name, name, *MEDINF
Optional
MEDCLS Media class Generic name, name, *ALL Optional
PERIOD Time period for save files Element list Optional
Element 1: Start time and date Element list
Element 1: Beginning time Time, *AVAIL
Element 2: Beginning date Character value, *BEGIN, *CURRENT
Element 2: End time and date Element list
Element 1: Ending time Time, *AVAIL
Element 2: Ending date Character value, *END, *CURRENT
DEV Device Single values: *SAVF
Other values (up to 4 repetitions): Name, *MEDCLS
Optional
MEDPCY Media policy Name, *SAVF, *SYSPCY Optional
SEQNBR Sequence number 1-16777215, 1, *END Optional
ENDOPT End of media option *UNLOAD, *LEAVE, *REWIND Optional
USEOPTBLK Use optimum block size *BKUPCY, *DEV, *NO, *YES Optional
CLEAR Clear *AFTER, *ALL, *NONE, *SAVF Optional
COMPACT Data compaction *SAVF, *DEV, *NO Optional
ALWADLSAVE Add subsequent saves *NO, *YES Optional

Control group (CTLGRP)

Specifies the name of the control group that was processed to create the save files that you want to copy to removable media.

Single values

*ALL
Save files created by any control group that meet the other parameters are copied to removable media.

Other values (up to 50 repetitions)

*NONE
No control group is used to copy save files to removable media.
generic*-control-group-name
Specify a generic control group name. For example, specifying WEEK* would cause all control groups whose names begin with WEEK to be included in the control groups whose save files are copied to removable media.
control-group-name
Specify the control group whose save files are copied to removable media. You can specify up to 50 control group names.

Note: You can specify an existing control group name, or a name that you want to be associated with the save operation, even if the name is not an existing control group. The control group name is saved with the media information and can be used with the control group name parameter in recovery processing by control group.

Library (LIB)

Specifies the name of the library that is saved in save files that you want to copy to removable media.

Single values

*ALL
All libraries that are saved in save files and meet the other parameter specifications are copied to removable media.

Other values (up to 50 repetitions)

*MEDINF
You want to copy BRMS media information saved in save files to removable media. The QUSRBRM library contains the BRMS media information.
generic*-library-name
Specify a generic library name. For example, specifying APP* would cause all libraries whose names begin with APP to be included in the libraries that are saved in save files to be copied to removable media.
library-name
Specify the name of the library that is saved in save files that you want to copy to removable media. You can specify up to 50 library names.

Media class (MEDCLS)

Specifies the name of the media class associated with the control groups whose save files you want to move to removable media.

*ALL
Save files with any media class that meet the other parameter specification are copied to removable media.
generic*-media-class-name
Specify that the media class name is generic. For example, specifying CART* would cause all media classes whose names begin with CART to be included in the media classes associated with save files that are copied to removable media.
media-class-name
Specify the media class associated with save files that you want to copy to removable media.

Time period for save files (PERIOD)

Specifies the period of time for which the save files are selected to save to media.

Element 1: Start time and date

One of the following is used to specify the beginning creation time at which or after save files are included. Any save files created before the specified time and date are not included in the selected save files for copy to removable media.

Element 1: Beginning time

*AVAIL
Any time that is available for the beginning date is included.
begin-time
Specify the beginning time for the specified beginning date that indicates which save files are to be included.

The time is specified in 24-hour format and can be specified with or without a time separator:

  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh=hours, mm=minutes and ss=seconds. Hours, minutes, and seconds must each be exactly 2 digits (using leading zeros if necessary).
  • With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.

Element 2: Beginning date

One of the following is used to specify the beginning date on which or after which the save files must have been created. Any entries created before the specified date are not included in the copy to media.

*BEGIN
Save files from the beginning of the save file media content information are copied to tape.
*CURRENT
Save files with a current date creation date and between the specified beginning and ending times (if specified) are copied to media.
begin-date
Specify the beginning date. The date must be specified in the job date format.

Element 2: End time and date

One of the following is used to specify the ending time before which save files are included. Any save files created after the specified time and date are not included in the items selected for copy to media.

Element 1: Ending time

*AVAIL
Any time that is available for the ending date is included.
end-time
Specify the ending time for the specified ending date that indicates which save files are to be included.

Element 2: Ending date

One of the following is used to specify the ending date on which or before which the save files must have been created. Any save files created after the specified date are not included in the copy to media operation.

*END
The save files to the end of the save file media content information are copied to media.
*CURRENT
The save files with a current day creation date is the last day for which save files are copied to media.
end-date
Specify the ending date. The date must be specified in the job date format.

Device (DEV)

Specifies the name of the device to which you want to copy selected save files.

Single values

*SAVF
Save files are copied to the device specified when the save files were created.

Other values (up to 4 repetitions)

*MEDCLS
BRMS determines the media class specified for the save file. Once the media class is determined, a device that supports that media class is selected to copy the save file.
device-name
Specify the device to which you want to copy the selected save files.

Media policy (MEDPCY)

Specifies the name of the media policy that BRMS should use when it selects media to contain the save file data.

*SAVF
Media is assigned using the media policy specified when the save files were created.
*SYSPCY
Media is assigned using the media policy specified in the system policy.
media-policy
Specify the media policy that you want to use for selected save files.

Sequence number (SEQNBR)

Specifies, when tape is used, the sequence to use for the save operation.

Note: If you are saving to a BRMS volume that is expired, BRMS will begin writing information at the beginning of the volume, even though you have specified *END.

Note: If you are saving to a BRMS BRMS will redirect the output to begin at the logical end of the output volume (after the end of the last active file), depending on the output device that you are using. For example, a 3490 device can write to any sequence number whereas a 6525 device can only write to sequence number 1 or *END.

1
The first file is to be sequence number 1.
*END
The save operation begins after the sequence number of the last active file on the volume.
file-sequence-number
Specify the sequence number of the file to be used for the save operation. Sequence numbers can range from 1 to 16,777,215.

End of media option (ENDOPT)

Specifies the operation that is automatically done on the tape or optical volume after the save operation ends. If more than one volume is included, this parameter applies only to the last volume used; all other volumes are rewound and unloaded when the end of the volume is reached.

Note: If no objects are saved, the volume is not opened and the ENDOPT parameter is ignored.

Note: For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored.

If you specify *LEAVE and the device is a shared device, the device will not be varied off after the save operation. If you specify *LEAVE and the device is not a shared device, the device will be varied off after the save operation.

*UNLOAD
The volume is automatically rewound and unloaded after the save operation ends.
*LEAVE
The volume does not rewind or unload after the operation ends. It remains at the current position on the device.
*REWIND
The volume is rewound, but not unloaded.

Use optimum block size (USEOPTBLK)

Specifies whether or not the optimum block size is used for the save operation.

Note: This parameter is ignored if the Device (DEVICE) parameter specified is an optical device.

*BKUPCY
Use the value from the backup policy for the Use optimum block size parameter.
*DEV
Use the value specified on the Work with Devices display for the Use optimum block size parameter.
*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 or the Duplicate Media using BRM (DUPMEDBRM) command.
*YES
The optimum block size supported by the device is used for Save commands. If the block size 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) and Duplicate Media using BRM (DUPMEDBRM) 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 Data Compression (DTACPR) parameter is ignored.

Clear (CLEAR)

Specifies whether uncleared volumes or save files encountered during the save operation are automatically cleared.

*SAVF
Uses the value specified when the save file was created.
*AFTER
All the uncleared volumes after the initial volume are automatically cleared. If the operation cannot proceed because the first volume is uncleared, an inquiry message is sent to the system operator, allowing him to end the operation or to specify that the currently selected volume be cleared so the operation can continue.
*ALL
All the uncleared volumes or save files encountered during the save operation are automatically cleared. If tapes are used and a sequence number is specified, the volume is cleared and, starting with that sequence number, all volumes following the first volume are cleared.
*NONE
None of the uncleared volumes or save files encountered during the save operation are automatically cleared. If the save operation cannot proceed because an uncleared volume is encountered, an inquiry message is sent to the operator, allowing the ending of the save operation, or specifying that the currently selected volume be cleared so the operation can continue.

If a save file is not cleared, the inquiry message is sent to the work station message queue for an interactive job, or to the operator for a batch job. All volumes used to perform the save operation should be cleared, or the save file must be empty, before the save command is issued.

Data compaction (COMPACT)

Specifies whether data compaction is performed.

*SAVF
Uses the data compaction value specified when the save file was created.
*DEV
Device data compaction is performed if the data is saved to tape and all devices specified on the Device (DEV) parameter support the compaction feature.
*NO
No data compaction is performed.

Allow subsequent saves (ALWADLSAVE)

Specifies whether you intend to save save files to media in subsequent save file operations.

*NO
You do not intend to save save files on subsequent save operations. The save files will be deleted from the system when maintenance is run after these save files are saved to media or when these save files expire.
*YES
You intend to save save files on subsequent save operations. The save files will not be deleted from the system when maintenance is run. If you specify this value, you must run a subsequent SAVSAVFBRM command using ALWADLSAVE(*NO) to enable removal of these save files from the system.

Examples

Example 1: Saving Save Files to Removable Media

SAVSAVFBRM CTLGRP(BACK*) MEDCLS(QIC1000) BEGIN(*AVAIL '1/1/03')
           END(*AVAIL *CURRENT)

This command saves all backup control groups whose name begins with the BACK that created save files with media class QIC1000. The device to which the save files are to be saved is specified in the save file itself and is thus not specified in the command. The save files that are to be included are save files that were created between 1/1/2003 and the current date. Creation time does not matter. Expired save files that are not waiting to be copied to tape are deleted when the command processes.

Error messages

*ESCAPE Messages

BRM1500
Save file processing is canceled.
BRM1502
Save file processing is canceled.
BRM1504
Save file processing is canceled.
BRM1506
Save file processing is canceled.
BRM1520
Operation canceled by user reply.
BRM1646
Save operation canceled.
BRM1917
Feature not installed.
BRM1921
Feature not licensed.
BRM1941
Operation canceled because of reply to check of expired media.
BRM2265
Errors occurred initiating session using device &1.
BRM4040
Access denied for user &1.
BRM40A2
BRMS product initialization required.
CPF3700
All CPF37xx messages could be signaled. xx is from 01 to FF.
CPF3800
All CPF38xx messages could be signaled. xx is from 01 to FF.
CPF9800
All CPF98xx messages could be signaled. xx is from 01 to FF.