EDIF can check whether several programs are updating a data set simultaneously and can prevent this type of simultaneous update from occurring. To tell EDIF to check for simultaneous updates, specify OPTION(ENQUEUE) on a DEFAULT, DSORG, PREFIX, SUFFIX, PATTERN, or DATASET statement. To detect and prevent these updates, EDIF issues an ENQ request that uses the QNAME EDIDSN. In a multiple-system environment, use GDIF or a similar product to propagate these ENQ requests to all systems.
To detect simultaneous updates for testing purposes, we recommend using the following statement:
OPTION=(ENQUEUE,SMF,SUPPRESSMESSAGES)
This lets you identify data sets that are victims of simultaneous updates without sending notification messages to TSO users and operators. You can then decide whether to make programs wait for access to a data set.
For example, to detect simultaneous updates for the SYS1.LINKLIB data set and record these updates in an SMF record, you would specify the following statement in the EDIPARMS member:
DATASET NAME=SYS1.LINKLIB OPTION(ENQUEUE,SMF)
To prevent simultaneous updates, specify the following statement:
OPTION=(ENQUEUE,WAIT,CONFLICTMESSAGES)
This tells EDIF to check for simultaneous updates and issue conflict messages when two or more jobs attempt to update a data set simultaneously.
Because we also specified the WAIT option, EDIF prevents the update from occurring by issuing an ENQ request for QNAME EDIDSN. This ENQ request serializes access to the data set. We recommend that you do not specify the SUPPRESSMESSAGES option to suppress notification messages when the WAIT option is in effect.
For example, to prevent simultaneous updates for the SYS1.LINKLIB data set and record update violations in an SMF record, specify the following statement in the EDIPARMS member:
DATASET NAME=SYS1.LINKLIB OPTION=(ENQUEUE,WAIT,SMF,CONFLICTMESSAGES)
VSAM Data Sets
We do not recommend EDIF OPTION=ENQ processing for VSAM data sets that have SHAREOPTIONS of 1 or 2. If the SHAREOPTIONS are 3 or 4, then you can use EDIF to prevent simultaneous updates. If EDIF ENQ processing is in effect for a VSAM data set with SHAREOPTIONS of 1 or 2, deadlocks could result between the SYSVSAM and EDIDSN ENQs. We also recommend that you not code DSORG=VSAM OPTION=(ENQ,WAIT) because this would extended EDIF ENQ processing to all VSAM data sets.
Example: Preventing Simultaneous Updates
Suppose that you want EDIF to perform the following tasks for partitioned data sets:
To do this, specify the following statements in the EDIPARMS member:
DSORG NAME=PARTITIONED OPTION=(ENQUEUE,WAIT,SMF,CONFLICTMESSAGES)
DATASET NAME=TEST1.MYDATA OPTION=NOWAIT
|
Copyright © 2014 CA.
All rights reserved.
|
|