z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Sharing a BISAM DCB between Related Tasks

z/OS DFSMS Using Data Sets
SC23-6855-00

If there is the possibility that your task and another task will be accessing the same data set simultaneously, or the same task has two or more DCBs opened for the same data set, use data set sharing. You specify data set sharing by coding DISP=SHR in your DD statement. When a data set is shared, the DCB fields are maintained for your program to process the data set correctly. If you do not use DISP=SHR, and more than one DCB is open for updating the data set, the results are unpredictable.

If you specify DISP=SHR, you must also issue an ENQ for the data set before each I/O request and a DEQ on completion of the request. All users of the data set must use the same qname and rname operands for ENQ. For example, you might use the data set name as the qname operand. For more information about using ENQ and DEQ, see z/OS MVS Programming: Assembler Services Reference ABE-HSP and z/OS MVS Programming: Assembler Services Guide.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014