Enqueue conflicts – using the ALLOCENQ environment - Latest

Syncsort™ Storage Management Allocation Control Center and Space Recovery System Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ software
Product
Syncsort™ Storage Management > Syncsort™ Space Recovery System
Syncsort™ Storage Management > Syncsort™ Allocation Control Center
Version
Latest
ft:locale
en-US
Product name
Syncsort Storage Management
ft:title
Syncsort™ Storage Management Allocation Control Center and Space Recovery System Guide
Copyright
2026
First publish date
1991
ft:lastEdition
2026-04-01
ft:lastPublication
2026-04-01T09:40:09.707000
L1_Product_Gateway
Integrate
L2_Product_Segment
IBM Infrastructure
L3_Product_Brand
Precisely Syncsort
L4_Investment_Segment
Mainframe
L5_Product_Group
Mainframe Storage Optimization
L6_Product_Name
Syncsort Storage Management

Datasets are ENQueued by allocation and deallocation processing when it is necessary to control access to a file. For example, a job which creates a dataset with DISP=NEW must have exclusive control over the dataset, so that other tasks cannot create or use a similarly-named dataset at the same time. Exclusive control must also be obtained when deleting a dataset, so that other tasks cannot access the dataset while it is being deleted. Allocation and deletion processing use the ENQueue mechanism to obtain either exclusive or shared control over datasets as needed. If the proper ENQueue cannot be obtained for a dataset being allocated or deleted, the allocation or deletion process fails.

Unfortunately, in many instances, when an attempt to create, delete, or access a dataset fails due to an enqueue conflict, it is difficult to know what other jobs or tasks may have been using the dataset and on what system they are running. Depending upon the circumstances, the system may or may not issue messages indicating who the culprits are. A DISPLAY GRS console command can be used to obtain enqueue information, but this can only be performed after-the-fact (by which time the conflicting task may have freed the dataset) and requires console command authority.

ACC users can use the DEFENV statement in the ACC policy rules to enable the ALLOCENQ environment to automatically receive control when an enqueue conflict causes the allocation or deallocation of a dataset to fail. Currently, ALLOCENQ receives control for two dynamic allocation return codes. These are return code x’210’ (requested dataset allocated to another job) and return code x’20C’ (request for exclusive use of a shared dataset cannot be honored). If the ACC policy rules in this environment set the value of &ENQERRMSG to YES, then ACC will scan the GRS queues for other tasks which are using the dataset. Message ACC20641 will then be issued to indicate which tasks and systems are holding the enqueue and preventing the allocation from completing. If the ACC policy rules also set the value of &JCLFAIL to YES, then allocation with fail with return code x’215’ (an invalid dynamic allocation return code) and message ACC29700 in order to draw attention to the error.

Examples 25 and 26 in this manual show the use of the ALLOCENQ environment.