IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ENQ option in PL/I


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
Location: Hyderabad

PostPosted: Thu Mar 12, 2009 1:31 pm
Reply with quote

Hi,

I have read somewhere that ENQ option can be used for PL/I program. Can someone tell me what is it about?


----
Bharath
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 12, 2009 6:49 pm
Reply with quote

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,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
No new posts INSYNC option with same function as I... JCL & VSAM 0
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
Search our Forums:

Back to Top