Control ASP Access (QYASPCTLAA) API


  Required Parameter Group:

1 ASP name Input Char(10)
2 Operation key Input Binary(4)
3 Request handle Input Char(8)
4 Return handle Output Char(8)
5 Error Code I/O Char(*)

  Default Public Authority: *EXCLUDE

  Threadsafe: Yes

The Control ASP Access (QYASPCTLAA) API performs one of a set of operations on an independent ASP (IASP). The operation can be any of the following:


Authorities and Locks

To use this API you must have *JOBCTL special authority. *USE authority is required to each of the ASP device descriptions in the ASP group identified by parameter one. An *EXCLRD lock is obtained on each of the ASP device descriptions in the ASP group.


Required Parameter Group

ASP name
INPUT; CHAR(10)

The name of a UDFS or primary ASP. If a primary ASP is specified, the operation is performed on all ASPs in its ASP group.

Operation key
INPUT; BINARY(4)

An integer value indicating which operation is to be performed. Valid operation key values are:

1 Start exclusive
2 Start shared
3 End shared
4 End exclusive

The following is a description of each operation:

Start exclusive
If there is an existing start exclusive for the ASP, the request is denied. Otherwise the API ends jobs that have threads using the ASP and returns a return handle that identifies this start exclusive request. Once the start exclusive is in effect, other jobs can do start shared and present the same handle. These requests will be accepted but requests with a different handle but the same ASP will be rejected.

The request handle must be blanks for this operation.

Start
If the request handle does not have the same value as the return handle of the current start exclusive, the request is denied. Only jobs that have done start exclusive or start shared will be able to do Set ASP Group (SETASPGRP) command requests and use IFS objects in the ASP.

End shared
Ends the job's shared use of the ASP.

End exclusive
Varies the IASP to the AVAILABLE state and allows SETASPGRP requests and requests to use IFS objects to be accepted without presentation of a current valid handle. This operation must be performed in the same job as the one that did the start exclusive.

Request handle
INPUT; CHAR(8)

A valid handle whose value is that of the return handle from the current start exclusive for the ASP.

Return handle
OUTPUT; CHAR(8)

A handle that must be used as the request handle on all QYASPCTLAA operations except start exclusive.

Error code
I/O; CHAR(*)

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


Use of Start and End Exclusive

The following are ways in which Start Exclusive can be paired with End Exclusive.



Sample Uses

The value of this API is that it can be used to achieve a "restricted" state for an IASP without ending all subsystems. This allows functions such as TCP and clustering to remain active during operations where one might otherwise have gone into restricted state. It also allows applications that are not using the ASP to continue to function.

Some possible uses of this API are:



Error Messages

Message ID Error Message Text
CPF1002 E Cannot allocate object &1.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
CPF3C3C E Value for parameter &1 not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9802 E Not authorized to object &2 in library &3.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFB8E5 E Vary Configuration or Reclaim Storage detected a problem.
CPFBA44 E Operation key not valid.



API introduced: V5R4

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