Move Library to ASP (QHSMMOVL) API


  Required Parameter Group:


  Optional Parameter Group 1:


  Default Public Authority: *USE

  Threadsafe: No

The Move Library to ASP (QHSMMOVL) API moves a library and its contents from its existing auxiliary storage pool (ASP) to the specified target ASP through a save and restore operation. The API preserves private authorities to the objects that would normally be lost with a save and restore operation.

Program (*PGM) objects in the library will be placed in library QRPLOBJ (or library QRPLxxxxx if the library is in a primary or secondary ASP (where 'xxxxx' is the ASP number of the primary ASP of the ASP group)) and a copy of each *PGM object will be moved with the library to the target ASP.

After a library has been moved, the following attributes are changed for every object in the library and the library.


Restrictions

Authorities and Locks

Auxiliary Storage Pool (ASP) Device Authority
*USE authority for each auxiliary storage pool (ASP) device in the ASP group when a specific ASP device name is specified for the source or target auxiliary storage pool (ASP) device name or when a value greater than 32 is specified for the source or target auxiliary storage pool (ASP) number.

Object Authority
See Authority required for objects used by commands in the Security reference topic collection for detailed information about object authorities required when you save objects.

Library Authority
*OBJALTER

Object Lock
See the Backing up your system topic collection for detailed information about locks that are applied to objects during save operations.

Library Lock
*EXCL

To prevent access to other jobs, the library is renamed to QHSMLIBxxx where xxx is a numeric increment to allow multiple concurrent move operations.


Required Parameter Group

Library name
INPUT; CHAR(10)

The name of the library to be moved to the specified auxiliary storage pool (ASP).

Target auxiliary storage pool (ASP) number
INPUT; BINARY(4)

The number of the auxiliary storage pool (ASP) to which the library is to be moved. The following values can be used for the ASP number:


Check dependencies
INPUT; CHAR(10)

Identifies whether object and journal dependencies should be checked and whether the API is to return after the dependency checking. When object dependencies are checked, the API validates that every object type in the library can exist in the target ASP. When journal dependencies are checked, the API validates that there are no *JRN or *JRNRCV objects, no journaled objects in the library and the library itself is not journaled. Database dependencies are always checked to validate that there are no database dependencies outside the library. You can use one of the following values:


Error code
I/O; CHAR(*)

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


Optional Parameter Group 1

Target auxiliary storage pool (ASP) device name
INPUT; CHAR(10)

The name of the auxiliary storage pool (ASP) device from which storage is allocated for the library after the move. The ASP device must have a status of 'Available'. If this parameter is omitted, the target auxiliary storage pool (ASP) number parameter will be used. This parameter must be *TGTASP if specified when the target auxiliary storage pool (ASP) number parameter has a value other than -1. The target ASP device must be different from the ASP device where the library currently exists.

One of the following special values may be specified:


Source auxiliary storage pool (ASP) number
INPUT; BINARY(4)

The number of the auxiliary storage pool (ASP) from which the library is to be moved. If this parameter and the source auxiliary storage pool (ASP) device name parameter are both omitted, the library name space for the current thread will be searched for the library.

The following values for the ASP number can be used:


Source auxiliary storage pool (ASP) device name
INPUT; CHAR(10)

The name of the auxiliary storage pool (ASP) device from which storage is allocated for the library to be moved. The ASP device must have a status of 'Available'. This parameter must be *ASP if specified when the source auxiliary storage pool (ASP) number parameter has a value other than -1. If this parameter and the source auxiliary storage pool (ASP) number parameter are both omitted, the library name space for the current thread will be searched for the library.

One of the following special values may be specified:


Error Messages



API introduced: V4R3

[ Back to top | Object APIs | APIs by category ]