Synchronize access to dataset in Entire System Server?

Is there a way to exercise thread-like control over access to an operating-system dataset such that only one process can access it at a time? That is, something equivalent to putting Adabas records on hold.

I want to store information in a dataset so that processes from the Test or Production side of Natural have read-write access to the same data in real time. My program retrieves from the data with FIND READ-FILE, modifies it, then stores to the same dataset with PROCESS WRITE-FILE.

I want only one read-write cycle to run at a time. Would this automatically be controlled in a batch environment?

Thanks for any advice.

Did you check the RESOURCE-CONTROL view which may be used to synchronize all kinds of processes in Entire System Server?

Regards, Klaus.

Klaus,

Thank you for your response. Yes, RESOURCE-CONTROL looks very promising. I don’t understand some of the parameters, especially two that appear to be central: QNAME, the major name of the resource, and RNAME, the minor name of the resource.

Also, I am not clear on the term “resource.” Could my dataset be considered the “resource” I wish to control? Would QNAME be simply the name of my dataset?

My main source of information so far is the View Description in the documentation for ESY [url]http://techcommunity.softwareag.com/ecosystem/documentation/natural/npr342mfr/ug/ug_vd_resource.htm#ug_vd_resource[/url]. Do you know where I can get more detailed information or just learn more about the terminology?

Thanks very much, Steve

Steve,

To learn more about the terminology I suggest you take a look at IBM’s publication" z/OS V1R1.0 MVS Assembler Services Guide", chapter 6.3 “Serializing Access to Resources (ENQ and DEQ Macros)”, online at:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2A600/6.3?DT=20010118132535
The operating system already controls access to your dataset using QNAME=‘SYSDSN’ and RNAME=your_data_set_name, but it does not protect it from being read in parallel. If you want to serialize the whole read-update-cycle, you need to define you own resource name and ENQ/DEQ on that.

Regards, Klaus.

Klaus,

This is great. Thanks so much.

-Steve