ADSR
Purpose
Use the ADSR control statement to specify the use of special resources by an operation.
Format
Restrictions
You cannot use ACTION(SETDEFAULT) to set default values for this keyword: RESOURCE.
Parameters
- ACTION (SETDEFAULT | ADD)
- If you specify SETDEFAULT, the remaining keyword values that you
specify on the statement become default values for all ADSR statements
that follow. No application description is updated. Keywords that
you do not specify are assigned their standard defaults.
If you specify ADD or use it by default, the statement can result in an update of the database.
- KEEPONERR (N | Y)
- Defines whether the resource should be kept if the operation ends in error. If you do not specify this keyword, the default action is taken from the resource definition or RESOPTS statement.
- ONCOMPLETE (N| Y | R)
- Defines the value to which the global availability of the resource is reset at operation completion. If you do not specify this keyword, the default action is taken from the resource definition or RESOPTS statement.
- QUANTITY (quantity required)
- The number of this resource that the operation needs, in the range 1 to 999999. If you do not specify this keyword, the operation takes all the resource exclusively, if USAGE is X, or prevents the exclusive use of any of this resource by any other operation, if USAGE is S.
- RESOURCE (resource name)
- The name of the resource required by this operation. You can specify up to 44 characters. If the name contains special characters, enclose the string in quotation marks.
- USAGE (X | S)
- Defines whether the resource should be allocated as shared (S) or exclusive (X).
Examples
In this example, the operation
needs two of the resource 'LINE.LONDON' exclusively. The KEEPONERR
action is taken from the definition in the special resource database:
ADOP …
ADSR RESOURCE(LINE.LONDON) USAGE(X) Q(2)
In this
example, the operation requires shared access to the whole quantity
of the special resource PAYROLL.DATABASE, and keeps its allocation
if the operation fails:
ADOP …
ADSR RESOURCE(PAYROLL.DATABASE) KEEP(Y)