Locking VSAM in CICS

About CICS and BMS - In this Mainframe Forum - You can post your queries on CICS

Moderators: DikDude, Natarajan, Moderator Group

Post Reply
valli
Member
Posts: 1
Joined: Fri Apr 19, 2013 8:09 am

Locking VSAM in CICS

Post by valli » Fri Apr 19, 2013 8:14 am

Hi,
I hv a CICS program that reads a VSAM control file(say FILE1) for a sequence #. This (SEQ # + 1) is my key for another file(say FILE2) and this same (seq # + 1) is also updated in the VSAM control file FILE1 for the next tasks. Iam doing a READ with UPDATE option on the vsam CONTROL FILE FILE1 and then doing a SYNCPOINT after the REWRITE of FILE1.

In spite of this, another task seems to have fetched the same sequence # thereby resulting in DUPREC when file 2 is being written.

How can I avoid this concurrent reading / deadlock?

Thanks

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Apr 20, 2013 12:05 am

It may help if you post the relevant code - not the entire program, just the bits that deal with this control info.

How is the vsam file defined?
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others