z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


QUERYENQ—query system ENQ data

z/OS ISPF Services Guide
SC19-3626-00

The QUERYENQ service allows an ISPF dialog to obtain a list of all system enqueues, or all system enqueues that match the specified criteria.

Note: QUERYENQ may not return all enqueue data when there are many requestors with the same QNAME/RNAME combination. Only 84 requestors can be returned under these circumstances.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--QUERYENQ--TABLE(table-name)--QNAME(qname)----------->

>--RNAME(rname)--REQ(pattern)--WAIT--LIMIT(limit)--------------->

>--SAVE(list-id)--XSYS-----------------------------------------><

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('QUERYENQ'--,table-name--,qname--,rname------>

>--,pattern--,-+-'WAIT--'-+--,limit--,list-id------------------->
               '-'b'------'                     

>--,-+-'XSYS--'-+-);-------------------------------------------><
     '-'b'------'      

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPEXEC--(buf-len,--buffer);--------------------------><

Parameters

table-name
A table that must not exist before the service is called. It is returned to the user as an open, non-writable table. It is the caller's responsibility to delete the table with TBEND.
qname
A variable name that can contain a name or a prefix. A prefix must end in an asterisk. The default is '*' (all qnames). Maximum length is 8 characters and must be fully padded if called from a compiled program because embedded blanks are allowed.
rname
A variable name that can contain a name or a prefix. A prefix must end in an asterisk. The default is '*' (all rnames). Its length is 255 characters and must be fully padded or VDEFINED to a shorter length if called from a compiled program because embedded blanks are allowed.
pattern
Used to limit the ENQ search to specific requestors. The pattern can contain asterisks which will match zero or more characters, and percent signs which will match one character. The value of pattern is the actual pattern, and not a variable name.

If the variable value is not a prefix (does not end in an asterisk before any trailing blanks), it must be the exact length of the RNAME being requested. For compiled programs, this can be controlled on the VDEFINE or VREPLACE statement. The exceptions to this rule are for QNAMEs SPFEDIT and SPFUSER. For SPFUSER requests, the variable name is padded or truncated to 7 characters. For SPFEDIT requests, variables less than 45 characters in length are padded with blanks to 44 and treated as a prefix. Variables longer than 44 characters are padded to 52 and not treated as a prefix. Variables that are passed in as a prefix are not changed.

WAIT
Indicates that all waiting ENQs are returned. This shows all ENQ contention known to the local system. RNAME and QNAME are ignored for WAIT.
limit
The maximum size of the table. The default is 5000. Zero (0) indicates no limit.
list-id
An 8-character data set name qualifier, used to create a data set named [prefix.userid].list-id.ENQLIST according to standard ISPF naming conventions. The data set is a VB 332 data set, containing the same data as would be returned in the table. The order is: Owner, System, Disposition, Hold, Scope, Global, QNAME, and RNAME. RNAME is last because trailing blanks are removed to reduce the size of the data set. A space is added between each field.
XSYS
Indicates that the XSYS=YES parameter should be used on the GQSCAN macro. The default is to use XSYS=NO. This means that some ENQs on other systems may not be returned. Use of the XSYS keyword may have significant performance implications. See the documentation for the GQSCAN macro in z/OS MVS Programming: Authorized Assembler Services Reference EDT-IXG for more information.

Variables returned in each row of the table

Table 1. Variables Returned in Each Row of the Table
Name Size Description
ZENJOB 8 Job or address space name holding or requesting the ENQ
ZENQNAME 8 Qname portion of the ENQ
ZENRNAME 255 Rname portion of the ENQ
ZENDISP 5 SHARE or EXCLU
ZENHOLD 4 OWN or WAIT
ZENSCOPE 7 SYSTEM or SYSTEMS
ZENSTEP 7 STEP or blank
ZENGLOBL 6 GLOBAL or blank
ZENSYST 8 System name
ZENRESV 7 RESERVE or blank

Return codes

These return codes are possible:
 0
Table returned or data set written, but XSYS parameter was not specified and the system is running in STAR mode. The data returned may not reflect all ENQs on all systems.
 2
Table returned or data set written.
 4
Table returned but truncated due to limit.
 8
No ENQs satisfy the request.
10
No ENQs satisfy the request, but XSYS parameter was not specified and the system is running in STAR mode. The data returned may not reflect all ENQs on all systems.
12
Table creation error, parameter or other termination error. See messages for more detail. This includes services not available due to configuration table restrictions.
14
The SAVE data set is in use by another user.
20
Severe error, including TBADD error or data set creation errors.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014