RESOURCE-CONTROL

File 32
Op-Sys z/OS
Statement PROCESS
Task This view can be used to synchronize access to resources. An application can lock and unlock resources, thus allowing synchronization of access by other applications that use the same technique.

Common Fields for all Operating Systems

Dictionary Field Name F/L Mu DE Remarks
ERROR-CODE N3      
ERROR-TEXT A58      
NODE N5   D  
NODE-NAME A16   D  
FUNCTION A8   D Required
SCOPE A8   D  
QNAME A8   D  
RNAME A250   D  
CONTROL A1   D  
RNAME-LENGTH N3   D  
TCB-ADDRESS B4      
ASID N4      
JOB-NAME A8      
STATUS A4      
RESERVE-UNIT A3   D  

Relevant Error Codes

Code Text z/OS
600 Unknown operation X
610 QNAME missing X
611 QNAME cannot start with SYS X
612 RNAME missing X
613 RNAME length missing X
614 Resource is in use X
615 Resource held by another task X
616 Error in GQSCAN routine X

Field Descriptions

Field Name Type/Length Operating System
ASID (N4)  

The address space ID that enqueued.

Field Name Type/Length Operating System
CONTROL (A1)  

Type of control. Possible values:

Value Explanation
E Default. Exclusive control.
S Shared control.
Field Name Type/Length Operating System
FUNCTION (A8)  

Possible values:

Value Explanation
DEQ Release resource.
ENQ-TEST Test whether resource is available.
ENQ-USE If resource is available, get control of it. Any resources held by a user or application are released at logoff.
LIST List all ENQs
Field Name Type/Length Operating System
JOB-NAME (A8)  

The job that enqueued.

Field Name Type/Length Operating System
QNAME (A8)  

The major name of the resource. This name may not begin with SYS. See example below.

Field Name Type/Length Operating System
RESERVE-UNIT (A3)  

The UCB address of the RESERVE.

Field Name Type/Length Operating System
RNAME (A250)  

The minor name of the resource. See example below.

Field Name Type/Length Operating System
RNAME-LENGTH (N3)  

Length of the minor name of the resource (1 - 250).

Field Name Type/Length Operating System
SCOPE (A8)  

Possible values:

Value Explanation
RESERVE  
RESPEND Reserve pending.
STEP  
SYSTEM  
SYSTEMS  
Field Name Type/Length Operating System
STATUS (A4)  

Possible values:

Value Explanation
OWNS Owner of resource.
WAIT Waiting for resource.
Field Name Type/Length Operating System
TCB-ADDRESS (B4)  

The TCB address of the task that enqueued.

Example:

The following Natural program displays the minor names of the resources with major name SPFEDIT enqueued for job XCOM148.

  FIND    RESOURCE-CONTROL WITH FUNCTION = 'LIST'
  AND QNAME = 'SPFEDIT'
  AND RNAME = '*'
  WHERE JOB-NAME = 'XCOM148'
  DISPLAY RNAME (AL=79)
  END

Example output from the above program:

                            RNAME
  -----------------------------------------------------------------

  SYSM.PROCLIB       LC370LR
  USAKXH.SOURCE       DLODTXGL
  WKK.SYSF.SOURCE      ASMJ3
  BROKER.IV100.SAGNA.JCL     $README
  BF.COMN.C.SOURCE      WRTR
  BF.COMN.C.SOURCE      CCLA
  USARMK.SAGNA.SOURCE     COPYPDS