This function returns information about the enqueue status of a data set in a series of predefined variables.
Follow these steps:
{handle|info} = DSNENQ({OBTAIN},{[pages]},dsname) {INFO} {handle} {RELEASE}{handle}
Parameters
Contains the retrieved enqueue information.
Numeric ID for an internal workspace. The handle must be passed with each subsequent call. The same handle can be reused for different data sets.
Returns data set information. The table in the following section lists the variables and values that a request using the INFO argument returns.
Obtains a new value for the handle argument, which is the address of the control block defining the data set.
Returns a handle value to the system to free the storage that is used. This is done automatically when the IMOD completes.
Number of 4096-byte work areas to be made available to the z/OS GQSCAN service. The work area is discarded after the function is executed. Specify a value from 1 to 5 (inclusive).
If your system regularly provides enqueues for many data sets, you might need to increase this value.
Default: 1
Data set name about which information is retrieved.
This list details the variables that the INFO argument returns. For stem variables, the stem index n begins with 1 and increases without breaks to dsn_count.
Name of the data set on which enqueue information is being retrieved.
Number of entries returned. This value is the maximum value of n.
ASID for entry n.
GRS (Global Resource Serialization) system name for entry n.
Status for entry n (OWN or WAIT).
Mode for entry n (SHR (shared) or EXCL (exclusive)).
For entry n, JOB, TSU, STC, or EXTERNAL (unknown type or owned by another CPU).
ARG n MISSING OR INVALID
NO OWNERS OF DATASET
Return code from GQSCAN service
INVALID HANDLE
Example
handle = dsnenq('OBTAIN') /* Get a new handle */ dsnenq('INFO',handle,'SYS1.HASPACE') == '' /* 121 if no owner */ dsn_count == 1 /* One owner found */
Copyright © 2014 CA Technologies.
All rights reserved.
|
|