RESOURCE-CONTROL

File 32
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.

Fields

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
600 Unknown operation
610 QNAME missing
611 QNAME cannot start with SYS
612 RNAME missing
613 RNAME length missing
614 Resource is in use
615 Resource held by another task
616 Error in GQSCAN routine

Field Descriptions

Field Name Type/Length
ASID (N4)

The address space ID that enqueued.

Field Name Type/Length
CONTROL (A1)

Type of control. Possible values:

Value Explanation
E Default. Exclusive control.
S Shared control.
Field Name Type/Length
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
JOB-NAME (A8)

The job that enqueued.

Field Name Type/Length
QNAME (A8)

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

Field Name Type/Length
RESERVE-UNIT (A3)

The UCB address of the RESERVE.

Field Name Type/Length
RNAME (A250)

The minor name of the resource. See example below.

Field Name Type/Length
RNAME-LENGTH (N3)

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

Field Name Type/Length
SCOPE (A8)

Possible values:

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

Possible values:

Value Explanation
OWNS Owner of resource.
WAIT Waiting for resource.
Field Name Type/Length
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

On this page