Save Object (QsrSave) API

  Required Parameter Group:


  Service Program Name: QSRLIB01

  Default Public Authority: *USE

  Threadsafe: No

The Save Object (QsrSave) API saves a copy of one or more objects that can be used in the integrated file system.

For detailed restrictions on using this API to save objects in libraries or to save document library objects, see Saving file systems in the Backing up your system topic collection.


Authorities and Locks

User Space
User Space Authority
*USE
User Space Library Authority
*EXECUTE
User Space Lock
*EXCLRD

Objects to Be Saved, Devices, Save While Active, Save-While-Active Message Queue, and Output
Locking
See Save-while-active object locking rules in the Backing up your system topic collection for information about object locking for the Save Object (SAV) command.
Authority
See Authority required for objects used by commands in the Security reference topic collection for authorities required for the Save Object (SAV) command.

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)
The user space that is to hold all the information for the save operation. The first 10 characters contain the user space name. The second 10 characters contain the name of the library where the user space is located. See User Space Format for the format of the information in the user space.

You can use the following special values for the library name. However, it should be noted that the library name that is actually used is not passed back to the user. Care should be taken when you use these special values to avoid unexpected results.


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


User Space Format

The following defines the format for the information in the user space. For detailed descriptions of the fields in the user space format, see Field Descriptions.

If the length of the data is longer than the key identifier's data length, the data will be truncated at the right. No message will be issued.

If the specified data length is shorter than the key field's defined data length, an error message is returned for binary fields. If the field is a character field, the data is padded with blanks and an error message will not be returned.

Note: This does not apply to keys that allow a list of values to be specified. In these cases, the amount of data read is based on the specified number of entries in the list.

If keys are duplicated in the user space, only the last value for a given key is used for the save operation.

Each variable length record must be 4-byte aligned. If not, unpredictable results may occur.


Field Descriptions

Data. The data used to specify the value for the given key.

Key. The parameter of the Save Object (SAV) command to specify. See Valid Keys for the list of valid keys.

Offset to first record. The offset from the beginning of the user space to the first variable length record.

Offset to next record. The offset from the beginning of the user space to the next variable length record.

Number of variable length records. The number of variable length records that are passed in the user space. Start of changeThe valid range is from 2 through 28.End of change

Reserved. Reserved. The possible value is:


Valid Keys

The following table lists the valid keys for the key field area of the variable length record. For detailed descriptions of the keys, see the Field Descriptions.

Some messages for this API refer to parameters and values of the Save Object (SAV) command. This table can also be used to locate the key names that correspond to the SAV command parameters. The field descriptions contain, in addition to detailed descriptions, the corresponding parameter values.

The object path name key and the device path name key are required keys. The other keys are optional.



Field Descriptions

The values shown in parentheses are the corresponding values for the SAV command parameters.

ASP device name. The names of the auxiliary storage pool (ASP) devices to be included in the save operation. The default is *ALLAVL. The possible values are:

Start of changeAsynchronous bring. Whether objects should be asynchronously brought into memory during the save processing. Depending on the directory tree structure, the amount of memory available, and the number of ojects which qualify for the save, asynchronously bringing the objects may improve save performance. The best performance improvement may be seen with a well balanced directory tree in which all objects qualify for the save. In situations where a large number of objects reside in a single directory, few objects qualify for the save, or the system is memory constrained, performance may degrade with Asynchronous bring specified. The default is 0. The possible values are:

Change period. A date and time range. Objects that changed within the range are saved.

If this key is not specified, the default of *ALL will be used for the start date and time and the end date and time.

End date. The date before which objects that have changed are saved. The possible values are:

End time. The time on the end date before which objects that have changed are saved. The possible values are:

Start date. The date after which objects that have changed are saved. The possible values are:

Start time. The time on the start date after which objects that have changed are saved. The possible values are:

Clear. Whether active data on the media is cleared or replaced automatically. Active data is any file on the media that has not expired. Clearing active data removes all files from the volume, starting at the specified sequence number for the tape. Replacing active data on optical media replaces only the optical files created by this operation. The default is 0.

Notes:

  1. Clearing a tape does not initialize it. Before the save command is issued, you should initialize the tape to a standard label format by using the Initialize Tape (INZTAP) command and specifying a value on the NEWVOL parameter.
  2. Clearing an optical volume does initialize it.
  3. 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.

The possible values are:

Data compaction. Whether device data compaction is performed. The default is 1. The possible values are:

Data compression. Whether data compression is performed. If the save operation is being done while other jobs on the system are active and software data compression is used, the overall system performance may be affected. The default is 2. The possible values are:

Device path name. The path name of the device to which the objects are saved.

Device path name. The path name of the device to which the objects are saved. The path name should be specified in the Qlg_Path_Name_T format. If a pointer is specified in the path name format, it must be 16-byte aligned. If not, unpredictable results may occur. For more information on this structure, see Path name format. The possible value is:

Number in array. The number of devices used during the save operation. The possible values are:

Offset to first device path name. The offset from the beginning of the user space to the first device path name in the list. The possible value is:

Offset to next device path name. The offset from the beginning of the user space to the next device path name in the list. The possible value is:

Reserved. Reserved. The possible value is:

Directory subtree. Whether the directory subtrees are included in the save operation. The default is 1. The possible values are:

End of media option. The operation that is performed automatically on the tape or optical volume after the save operation ends. If more than one volume is used, this key applies only to the last volume used; all other volumes are unloaded when the end of the volume is reached. The default is 0.

Note: This parameter is valid only if a tape or optical device name is specified. For optical devices, 2 is the only value supported; 0 and 1 are ignored.

The possible values are:

Expiration date. The media in the device cannot be overwritten until the expiration date. The default is 0999999. The possible values are:

Label. The file identifier of the media to be used for the save operation. The default is *GEN. The possible values are as follows:

Name pattern. Specifies a pattern to be used to include or omit objects.

Number in array. The number of pattern names. The possible values are:

Pattern Name. Specifies a pattern name. The possible value is:

Offset to first pattern name. The offset from the beginning of the user space to the first pattern name in the list. The possible value is:

Offset to next pattern name. The offset from the beginning of the user space to the next pattern name in the list. The possible value is:

Option. Whether names that match the pattern should be included or omitted from the save operation.

Note: The subtree key specifies whether the subtrees are included or omitted.

The possible values are:

Reserved. Reserved. The possible value is:

Object path name. The path name of the object to save. You can specify a pattern for this path name.

Number in array. The number of object path names to be saved. The possible values are:

Object path name. The path name of the object to save. You can specify a pattern for this path name. The path name should be specified in the Qlg_Path_Name_T format. If a pointer is specified in the path name format, it must be 16-byte aligned. If not, unpredictable results may occur. For more information on this structure, see Path name format. The possible value is:

Offset to first object path name. The offset from the beginning of the user space to the first object path name in the list. The possible value is:

Offset to next object path name. The offset from the beginning of the user space to the next object path name in the list. The possible value is:

Option. Whether names that match the pattern should be included or omitted from the save operation. When determining whether the name matches a pattern, name patterns are always treated as relative to the current working directory.

Note: The subtree key specifies whether the subtrees are included or omitted.

The possible values are:

Reserved. Reserved. The possible value is:

Object precheck. Whether the save operation ends if any of the selected objects cannot be saved. The default is 0. The possible values are:

Optical file. The path name of the optical file that is used for the save operation. The path name should be specified in the Qlg_Path_Name_T format. If a pointer is specified in the path name format, it must be 16-byte aligned. If not, unpredictable results may occur. For more information on this structure, see Path name format. The default is '*'. The possible values are:

Output. Whether a list of information about the saved objects is created. The information can be directed to a spooled file, a stream file, or a user space.

Option. Whether a list of information about the saved objects is created. The default is 0. The possible values are:

Output path name. The path name of the existing stream file or user space to which the output of the API is directed. The path name should be specified in the Qlg_Path_Name_T format. If a pointer is specified in the path name format, it must be 16-byte aligned. If not, unpredictable results may occur. For more information on this structure, see Path name format. The possible value is:

Reserved. Reserved. The possible value is:

Type of output information. The type of information that is directed to the spooled file, stream file, or user space specified for the output key. The possible values are:

Private authorities. Whether to save private authorities for the objects that are saved. The default is 0. The possible values are:

Save while active. Whether an object can be updated while it is being saved. The default is 0. The possible values are:

Save-while-active message queue. The path name of the message queue that the save operation uses to notify the user that save-while-active checkpoint processing is complete.

Option. Whether a message should be used to notify the user that save-while-active checkpoint processing is complete. The default is 0. The possible values are:

Reserved. Reserved. The possible value is:

Save-while-active message-queue path name. The path name of the message queue that will be used to notify the user that save-while-active checkpoint processing is complete. The path name should be specified in the Qlg_Path_Name_T format. If a pointer is specified in the path name format, it must be 16-byte aligned. If not, unpredictable results may occur. For more information on this structure, see Path name format. The possible value is:

Save-while-active option. The options that should be used with the save-while-active key. The possible values are:

Scan objects. Whether objects will be scanned while being saved when exit programs are registered with any of the integrated file system scan-related exit points and whether objects that previously failed a scan should be saved.

The integrated file system exit points are:



Scan during save. Whether objects will be scanned while being saved when exit programs are registered with any of the integrated file system scan-related exit points. The default is 0. The possible values are:

Save failed objects. Whether objects that previously failed a scan should be saved. The default is 0. The possible values are:

Sequence number. The tape file sequence number to be used. The default is -1. The possible values are:

Synchronization ID. The name of the synchronized checkpoint in which this save while active operation will participate. The synchronized checkpoint must already be started by the Start Save Synchronization (STRSAVSYNC) command. The default is *NONE. The possible values are:

System. Whether to process objects that exist on the local system or remote systems. The default is 0. The possible values are:

Target release. The release level of the operating system on which you intend to use the object being saved. The default is *CURRENT. The possible values are:

Update history. Whether to update the save history on objects saved with this save operation. The save history is used when *LASTSAVE is specified for the start time value of the change period key on a subsequent save operation. The possible values include:

Number in array. The number of update history values. The possible values are:

Update history. Whether to update the save history on objects saved with this save operation. The save history is used when *LASTSAVE is specified for the start time value of the change period key on a subsequent save operation. The default is 0. The possible values include:

Use optimum block size. Whether the optimum block size is used for the save operation. The default is 1. The possible values are:

Volume identifier. The volume identifiers of the volumes, or the cartridge identifier of a tape in a tape media library device, on which data is saved. The volumes must be placed in the device in the order specified on this key. After all specified volumes are filled, the save operation continues on whatever volumes are mounted on the device.

Length of each volume identifier. The character length of each of the volume identifiers. The possible value follows:

Number in array. The number of volume identifiers that are used during the save operation. The default is 0. The possible values are:

Offset to first volume identifier. The offset from the beginning of the user space to the first volume identifier in the list. The possible value is:

Offset to next volume identifier. The offset from the beginning of the user space to the next object volume identifier in the list. The possible value is:

Volume identifier. The volume identifiers of one or more volumes to be used. The possible value is:



Dependencies between Keys

The following two tables list the dependencies between the different keys. If the dependency pertains only to a certain value, then that value is also shown (key = n, where n is the value). Otherwise, if the dependency is true for all values of the key, then only the name of the key is given.

The following table lists the conditions where specifying a certain key forces the use of another key.

The following table lists the conditions where specifying a certain key excludes the user from using another key or a particular value of that key.



Relationship to SAV Command

Because of the relationship between the QsrSave API and the SAV command, the following situations should be noted:


Error Messages



API introduced: V4R3

[ Back to top | Backup and Recovery APIs | APIs by category ]