Start of change CICS VSAM Transparency for z/OS, Version 1.2


Table level locking

There might be occasions when you want a batch job to have exclusive access to a migrated data set. This is equivalent to specifying DISP=OLD in your JCL. CICS® VT provides a facility to exclusively access a migrated data set by issuing the LOCK tabx IN EXCLUSIVE MODE command when your application program opens the data set.

To use the facility, add the following DD statement to the JCL for your batch job:

//VIDLOCK  DD *
dim-name1
dim-name2
dim-name3

For each DIM name specified, CICS VT locks the table in exclusive mode. The facility is available for batch jobs that run in either non-subtasking or subtasking modes.

Table level locking and package bind implications

Using the table lock facility imposes certain rules as follows:

  • You must bind the DDM DBRM into the DB2 collection VIDLOCK.
  • You must specify RELEASE(DEALLOCATE) in the package bind.
  • Start of change The VIDLOCK package must be the first package in the package list in the plan bind, and VIDCOLL.* must be included as the last package in the package list. End of change
  • You must add the VIDPLAN DD statement and specify the name of the plan.

If one or more of these rules are not met, CICS VT issues a U3127 abend during open processing, and the program is abnormally terminated.

These rules are required in case you add SQL commit statements to your program, in which case the table lock would otherwise be released by a commit.

Table level locking and IRD implications

There are implications if you use the table lock facility for a DIM that has an IRD exit. CICS VT assumes that the IRD exit is being used to split a data set into multiple DB2 tables. To achieve the equivalent of DISP=OLD, a table accessed by an IRD exit must also be locked. You must take this into consideration when you write an IRD exit, and add the appropriate code.

During an open call for a DIM that is specified in the VIDLOCK DD statement, CICS VT calls the IRD exit. In the parameter list that CICS VT provides to the exit, the field IRDFUNCT has a value of ‘X’. Before the exit ends and returns control to CICS VT, the field IRDRET must be set to a value of ‘X’. When CICS VT resumes control, the value of IRDRET is checked. If it is not ‘X’, CICS VT issues a U3126 abend and the program is abnormally terminated

It is not essential for your IRD exit to issue the LOCK TABLE SQL statement, but IRDRET must be set correctly to avoid a U3126 abend.



Concept topic


Last updated: December 6, 2013 20:43:17

Concept Concept

Feedback


Timestamp icon Last updated: Friday, 6 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///topics/cvtug_tablecontrol.html
End of change