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.