Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
ENQ, along with its counterpart, DEQ, are not part of the PL/I Language base.
Assuming this is PL/I Batch, ENQ/DEQ are available as Assembler Language Macros, which are coded in Assembler sub-program's and Called from a given language, such as PL/I.
If this is CICS (regardless of the language), there are ENQ/DEQ commands (API's), which are part of CICS itself.
When you issue an ENQ, you're attempting to gain exclusive control over a known target RESOURCE, which can be a FILE, a FIELD, a TABLE, etc. If the RESOURCE is already ENQ'd then the program could either WAIT for the RESOURCE to free or inform the Caller or Program that the RESOURCE is currently unavailable.
What is the purpose for using an ENQ? Normally, it's very selective and specialized and the large majority of Application programs don't ever use ENQ nor DEQ, unless the reasons are compelling.
On the flip-side, when you're done with the ENQ of the target RESOURCE, a DEQ must be issued, removing exclusivity.
Regards, |
|