ENQ in CICS and What Does It Do?
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> CICS and Middleware

#1: ENQ in CICS and What Does It Do? Author: deepa12Location: chennai PostPosted: Thu Jul 31, 2014 5:59 am
    —
There is an existing code as follows
There is a AZFILE;LK-FILE-KEY has the contents of 1 of the AZFILEKEY and its a partial key. Say there are 15 records
Code:

 EXEC CICS ENQ                     
      NOSUSPEND                   
      RESOURCE (LK-FILE-KEY)       
      LENGTH (33)                 
      NOHANDLE

I understand that this is for resource serialisation. Where this lock will be tracked
After the above:
I update 1 of the record occurrence of this key say 11th
now i start browsing from the 1st occurrence actually the update is not available i.e is not reflecting in the records read until i issue a syncpoint
Is it that once i do any enq after that any updates to any file will not be commited & available to the program until the deq is done?

#2:  Author: kolusuLocation: San Jose PostPosted: Thu Jul 31, 2014 7:46 am
    —
deepa12,

ENQ is basically getting an EXCLUSIVE CONTROL of the dataset. It is the same as coding DISP=OLD in your JCL. Once you get an exclusive control, every body else who wants to access the dataset will have to wait.

It doesn't matter whether you update or just read the dataset once you get the ENQ.

SYNCPOINT is just committing the updates you made. That allows you to see the updates you made.

Unless you issue a DEQ , no one else can see the updates.

I don't remember the exact table that cics stores but you can get the list of ENQ using CEMT INQUIRE UOWENQ



MVSFORUMS.com -> CICS and Middleware


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group