Save Object List (QSRSAVO) API

  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Save Object List (QSRSAVO) API saves a list of objects or spooled files specified by the user. The list of objects, as well as any additional information needed for the save operation, is generated by the user into a user space.


Authorities and Locks

User Space
User Space Authority
*USE
User Space Library Authority
*EXECUTE
User Space Lock
*SHRNUP
Objects to Be Saved
If the user has save system (*SAVSYS) special authority, the following authorities are not needed. To save user profiles, you need *SAVSYS special authority. To save private authorities, you need *SAVSYS or all object (*ALLOBJ) special authority.
Object Authority
*OBJEXIST
Library Authority
*EXECUTE
Object Lock
*SHRNUP
Library Lock
*SHRUPD

Note: Lower levels of locking may be used for objects in certain cases. See Save while active object locking rules in the Backup and recovery topic collection for more information about these special cases.

Spooled Files to Be Saved
If the user has save system (*SAVSYS) special authority, the following authorities are not needed.
Output Queue Authority
*OBJEXIST
Output Queue Library Authority
*EXECUTE
Output Queue Lock
*EXCLRD

Note: Additional authority may be needed to change spooled file attributes. See New Attributes Format for more information.

Devices
Save File Authority
*USE and *ADD
Save File Library Authority
*EXECUTE
Save File Lock
*EXCLRD
Tape or Optical Authority
*USE
Tape or Optical Lock
*EXCL
Media Library Device Lock
*SHRUPD
Media Definition Authority
*USE
Media Definition Library Authority
*EXECUTE
Media Definition Lock
*EXCLRD
Auxiliary Storage Pool (ASP)
*USE

Note: If the save file will be cleared, *OBJMGT authority is also required.

Save While Active
Message Queue Authority
*OBJOPR and *ADD
Message Queue Library Authority
*EXECUTE
Output Files
Output File Lock
*SHRRD
If the output file does not exist:
Output File Library Authority
*READ and *ADD
If the output file exists and a new member will be added:
Output File Authority
*OBJMGT, *OBJOPR, and *ADD
Output File Library Authority
*EXECUTE and *ADD
If the output file exists and an existing member will be appended:
Output File Authority
*OBJMGT and *ADD
Output File Library Authority
*EXECUTE
If the output file exists and an existing member will be replaced:
Output File Authority
*OBJMGT, *OBJOPR, *ADD, and *DLT
Output File Library Authority
*EXECUTE

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. It should be noted, however, that the library name that is actually used is not passed back to the user. Care should be taken when using 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 you specify a data length that is longer than the key field's defined data length, the data is truncated at the right. No error message is returned.

If you specify a data length that 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.

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.

It is recommended, but not required, to align each variable length record on a 4-byte boundary. That is, you should make the length of each variable length record a multiple of 4, even if the data length is not a multiple of 4.


Field Descriptions

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

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

Length of data. The length of the data used to specify the value for the given parameter.

Length of variable length record. The length of the 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 39.End of change


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 Field Descriptions.

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

The library key and the device key are required keys. The other keys are optional.



Field Descriptions

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

ASP device name. The names of the auxiliary storage pool (ASP) devices to be included in the save operation. When saving user profiles, these are the ASPs from which private authorities are saved. The default is *. 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 data compaction is used. The default is 1. The possible values are:

Data compression. Whether data compression is used. The default is 2. The possible values are:

Device. The names of the devices used for the save operation. The device must already be known on the system by a device description. For the format of this field, see Device Key Format.

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 expiration date of the tape file or optical file created by the save operation. If a date is specified, the file is protected and cannot be overwritten until the specified expiration date. The default is 0999999. The possible values are:

File member. A list of the database files and their members that are to be saved. Each database file specified here must also be specified in the list of objects to be saved. If this key is not specified, the default of *ALL will be used for both the file name and the member name. For the format of this field, see File Member Format.

Label. The name that identifies the data file on the tape. Although the label key is defined as CHAR(*), the maximum length of a label is currently 17. If the length of data field is specified as more than 17, the label is truncated such that only the first 17 characters are used. The default is *LIB.

Library. A list of libraries that contain the objects that are saved. If more than one library is specified, *ALL must be the only object name specified (object information key) and the device cannot be *SAVF. For the format of this field, see Library Key Format.

Media definition. The name and library of the media definition that identifies the devices and media used to contain the saved data. For information about creating and using a media definition, see Saving to multiple devices to reduce your save window in the Backing up your system topic collection and Create Media Definition (QSRCRTMD, QsrCreateMediaDefinition) API. The first 10 characters contain the media definition name; the second 10 characters contain the library in which the media definition is located.

You can use these special values for the library name:

Object information. A list of the name and type of the objects to be saved. If *ALL is specified for the object name and object type, the list cannot contain other entries. The default for both the object name and the object type is *ALL. For the format of this field, see Object Information Format.

Object precheck. Whether the save operation for a library should end if all objects specified by the API do not satisfy all the following conditions:

The default is 0. The possible values are:

Start of change Object selection list. A list of the selection criteria for the objects to be saved. You can select from the objects specified for the object information and library keys. For the format of this field, see Object Selection List Format. End of change

Omit libraries. A list of the libraries to be omitted from the save operation. The default is *NONE. For the format of this field, see Omit Library Key Format.

Omit object information. A list of the name and type of the objects and library to be omitted from the save operation. If *ALL is specified for the object name and object type, the list cannot contain other entries. The default for both the object name and the object type is *ALL. For the format of this field, see Omit Object Information Format.

Optical file. The name that identifies the file on the optical volume. Although the optical file is defined as CHAR(*), the maximum length of an optical file name is currently 256 characters. If the length of data field is specified as more than 256 characters, the name is truncated such that only the first 256 characters are used. The default is '*'. The possible values are:

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

Output member. The name of the database file member used to save the object information. This field also determines whether to replace or add the data if the member already exists. The defaults are *FIRST for the output member name field and 0 for the option field. For the format of this field, see Output Member Format.

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

Qualified output file. The qualified name of the database file to which the information about the objects is directed. This key is required only if the output key is set to 2. The first 10 characters contain the output file name; the second 10 characters contain the output file library. The possible values for output file library are:

Queue data. A description of queue data to be saved. The default is no queue data. For the format of this key, see Queue Data Key Format.

Save access paths. Whether the logical file access paths that are dependent on the physical files being saved are also saved. The default is 2. The possible values are:

Save file. The name and library of the save file that is used to contain the saved data. The first 10 characters contain the save file name; the second 10 characters contain the library where the save file is located.

You can use these special values for the library name:

Save file data. For save file objects, whether only the description of a save file, or both the description and the contents of a save file are saved. The default is 1. The possible values are:

Note: For System/38™ environments, the default value of 1 is not valid; therefore, this key must explicitly be set to a value of 0.

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 name and library of the message queue that is used to notify the user that the checkpoint processing for a library is complete. The first 10 characters contain the message queue name; the second 10 characters contain the name of the library where the message queue is located. If *NONE or *WRKSTN is specified for the message queue name, blanks must be specified for the message queue library. The defaults are *NONE for the message queue name and blanks for the library.

The possible values for the message queue name are:

The possible values for the message queue library are:

Save while active wait time for object locks. If an object is not available, the amount of time to wait for a lock on the object before continuing the save operation. The default is 120. The possible values are:

Save while active wait time for other pending changes. For each library, the amount of time to wait for transactions with other pending changes to reach a commit boundary. Other pending changes include the following:

If a commit boundary is not reached for a library in the specified time, library is not saved. The default is -2. The possible values are:

Save while active wait time for pending record changes. For each group of objects that are checkpointed together, the amount of time to wait for transactions with pending record changes to reach a commit boundary. The Save while active key determines which objects are checkpointed together. If 0 is specified, all objects being saved must be at commit boundaries. If any other value is specified, all objects that are journaled to the same journals as the objects being saved must reach commit boundaries. If a commit boundary is not reached in the specified time, the save operation is ended, unless the value -3 is specified. The default is -2. The possible values are:

Sequence number. The sequence number to use for the save operation when tape is used. The default is -1. The possible values are:

Spooled file data. A description of spooled file data to be saved. The default is no spooled file data. For the format of this key, see Spooled File Data Key Format.

Storage. Whether the system storage that is occupied by the data portion of the following objects in the library being saved is freed:

The default is 0. 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:

Target release. The release of the operating system on which the objects will be restored and used. The object types specified (in the object information field) must exist on the specified release. The default is *CURRENT. The possible values are:

Type of output information. The type of information that is printed or directed to the output database file. The default is 0. The possible values are:

Update history. Whether the save history information of each object is changed to the date, time, and location of this save operation. The default is 1. The possible values are:

Use optimum block size. Whether the tape device's optimum block size should be used. Start of changeThe default is 1.End of change The possible values are:

Volume identifier. The volume identifiers of the tape volumes or optical volumes on which the object data is to be saved. All volume identifiers must be entered in the order in which you want them saved. The default is *MOUNTED. For the format of this field, see Volume Identifier Format.


Device Key Format



Field Descriptions

Device name. The name of the device used for the save operation. The possible values for each element of the array are:

Number in array. The number of devices to be used during the save operation. The possible values are 1 through 4.


File Member Format



Field Descriptions

File name. The name of the file being saved. The possible values are:

Member. The name of the member to save. The possible values are:

Number in array. The number of file and member structures used during the save operation. The possible values are 1 through 50.

Number of members. The number of member names for the given file name. Possible values are 1 through 50.


Library Key Format



Field Descriptions

Library name. The name of the library containing the objects. The possible values are:

Number in array. The number of libraries used during the save operation. The possible values are 1 through 32767.


Object Information Format



Field Descriptions

Number in array. The number of objects that are specified for this key. There is no limit for the number in array field. The total amount of information in the user space, however, cannot exceed 16MB.

Object name. The name of the object that is to be saved. The possible values are:

Object type. The type of the object that is to be saved. The possible values are:


Start of change Object Selection List Format



Field Descriptions

File member. The database file members to select. If *ALL is specified, the selected objects are included or omitted. If any value other than *ALL is specified, the File member key cannot be specified. The selected objects are included, even if the objects are not database files. If the objects selected are database files, the file members selected are included or omitted. The default value is *ALL. The possible values are:

Include or omit. Whether the objects selected by this entry are included or omitted from the save operation. Omit takes precedence over include. The possible values are:

Length of object selection list entry. The length of the object selection list entry information. The possible values are:

Library name. The name of the library that contains the objects. The default value is *ALL. The possible values are:

Number in array. The number of objects that are specified for this key. There is no limit for the number in array field. The total amount of information in the user space, however, cannot exceed 16MB.

Object attribute. The attribute of the object that is to be saved. The default value is *ALL. The possible values are:

Object name. The name of the object that is to be saved. The possible values are:

Object type. The type of the object that is to be saved. The default value is *ALL. The possible values are:

Offset to first object selection list entry. The offset from the start of the user space to the first object selection list entry.

Offset to next object selection list entry. The offset from the start of the user space to the next object selection list entry. The value must be 0 for the last entry in the list.

End of change

Omit Library Key Format



Field Descriptions

Library name. The name of the library containing the objects to omit. The possible values are:

Number in array. The number of libraries to omit from the save operation. The possible values are 1 through 32767.


Omit Object Information Format



Field Descriptions

Library name. The name of the library that is to be omitted. The possible values are:

Number in array. The number of values that are specified for this key. The possible values are 1 through 32767.

Object name. The name of the object that is to be omitted. The possible values are:

Object type. The type of the object that is to be omitted. The possible values are:



Output Member Format



Field Descriptions

Option. An indicator of whether to add to or replace the existing member. The possible values are:

Output member name. The name of the file member that receives the output. The possible values are:



Queue Data Key Format



Field Descriptions

Queue data. For queue objects, whether only the description of a queue, or both the description and the contents of a queue are saved. The default is 0.

The possible values are:

Number in array. The number of queue data values. The possible value is 1.



Spooled File Data Key Format



Field Descriptions

Length of spooled file data header. The length of the spooled file data header information. The possible values are:

Offset to spooled file selection list. The offset from the start of the user space to the first spooled file selection list entry. See Spooled File Selection List Entry Format. The default is 0. If the value of the spooled file data field is 2, the value of this field must be greater than 0. Otherwise, the value must be 0.

Spooled file data. Whether to save spooled file data and attributes. The default is 0. The possible values are:



Spooled File Selection List Entry Format



Field Descriptions

Include or omit. Whether the spooled files selected by this entry are included or omitted from the save operation. Omit takes precedence over include. The possible values are:

Length of spooled file selection list entry. The length of the spooled file selection list entry information. The possible values are:

Offset to new attributes. The offset from the start of the user space to the new attributes for the spooled files included by this selection list entry. The value must be 0 if the Include or omit field value is 0. For the format of the new attributes, see New Attributes Format.

Offset to next spooled file selection list entry. The offset from the start of the user space to the next spooled file selection list entry. The value must be 0 for the last entry in the list.

Offset to selection criteria. The offset from the start of the user space to the selection criteria.

Selection criteria format. The format of the spooled file selection criteria. The possible values are:



Spooled File ID Format

This is the format of the spooled file selection criteria when a value of 1 is specified for the selection criteria format field. The criteria specified must uniquely identify a single spooled file.



Field Descriptions

Creation date. The date the spooled file was created. This value is considered after the qualified job name, spooled file name, spooled file number, and job system name values. The possible values are:

Creation time. The time the spooled file was created. This field must be set to blanks if *LAST or *ONLY is specified for creation date. This value is considered after the qualified job name, spooled file name, spooled file number, job system name, and creation date values. The possible values are:

Job system name. The name of the system where the job that owns the spooled file ran. This value is considered after the qualified job name, spooled file name, and spooled file number values. The possible values are:

Length of spooled file ID. The length of the spooled file ID information. The possible values are:

Qualified job name. The name of the job that owns the spooled file. The qualified job name has three parts:

Spooled file name. The name of the spooled file.

Spooled file number. The unique number of the spooled file. The possible values are:



Spooled File Attributes Format

This is the format of the spooled file selection criteria when a value of 2 is specified for the selection criteria format field.



Field Descriptions

Ending creation date and time. Spooled files with a creation date and time less than or equal to this date and time are selected. The default is *ALL. The following special value is allowed:

The date and time must be specified in the format CYYMMDDHHMMSS:

C
Century, where 0 indicates years 19xx and 1 indicates years 20xx.

YY
Year

MM
Month

DD
Day
HH
Hour
MM
Minute
SS
Second

Form type. Spooled files with this form type are selected. Either a specific value or generic value may be specified. The default is *ALL. The following special values are allowed:

Job name. Spooled files owned by this job are selected. Either a specific name or generic name may be specified. The default is *ALL. The following special value is allowed:

Job number. Spooled files owned by a job with this job number are selected. If a job number is specified, then a specific job name and a specific user name must also be specified. The default is *ALL. The following special value is allowed:

Job system name. Spooled files owned by a job on this system are selected. Either a specific name or generic name may be specified. The default is *ALL. The following special values are allowed:

Length of spooled file attributes. The length of the spooled file data attributes information. The possible values are:

Qualified output queue. Spooled files on this output queue are selected, if they are found in the ASPs specified for the ASP device key. The qualified output queue has two parts:

Spooled file name. Spooled files with this name are selected. Either a specific name or generic name may be specified. The default is *ALL. The following special value is allowed:

Starting creation date and time. Spooled files with a creation date and time greater than or equal to this date and time are selected. The default is *ALL. The following special value is allowed:

The date and time must be specified in the format CYYMMDDHHMMSS:

C
Century, where 0 indicates years 19xx and 1 indicates years 20xx.

YY
Year

MM
Month

DD
Day
HH
Hour
MM
Minute
SS
Second

User name. Spooled files owned by this user are selected. Either a specific name or generic name may be specified. The default is *ALL. The following special value is allowed:

User-specified data. Spooled files with this user-specified data value are selected. Either a specific value or generic value may be specified. The default is *ALL. The following special value is allowed:



New Attributes Format

This is the format of new attributes to be assigned to the selected spooled files.



Field Descriptions

Expiration days. Start of changeThe number of days after the date selected in the start of expiration field when the spooled files will expire. The expiration date will be set for the selected spooled files on the system after they have been successfully saved. End of change The default is 0.

Note: The user needs additional authority to use any value other than 0. The default value of 0 will be used for any spooled files which the user is not authorized to change. The user is authorized to change the expiration date of a spooled file if any of the following conditions are met.

The possible values are:

Length of new attributes. The length of the new attributes information. The possible values are:

Start of changeStart of expiration. Indicates which date to use as the starting point for the expiration days field. A value of 1 is valid only when the expiration days field is greater than 0. The default is 0. The possible values are:

End of change

Volume Identifier Format



Field Descriptions

Length of volume identifier. The character length of the identifier of the volume. The possible value is:

Number in array. The number of volume identifiers used during the save operation. The possible values are 1 through 75.

Volume identifier. The identifier of a volume. The possible values are:



Dependencies between Keys

The following two tables list the dependencies between the different keys. If the dependency holds only for 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 SAVOBJ and SAVSECDTA Commands

Because of the relationship between the QSRSAVO API and the SAVOBJ and SAVSECDTA commands, the following situations should be noted:


Error Messages



API introduced: V3R1

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