View previous topic :: View next topic |
Author |
Message |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Thu Jul 31, 2014 5:59 am Post subject: ENQ in CICS and What Does It Do? |
|
|
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? _________________ deepa |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Thu Jul 31, 2014 7:46 am Post subject: |
|
|
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 _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|