Running a batch job or a CICS online transaction against the IDMS CV accessing the database in usage mode of retrieval. Sometimes it abends with a 0361 or 0326 error status which indicates the database could be corrupted but after running the IDMSDBAN utility it shows there are no broken chains in the database. If the job is rerun without any changes it completes successfully.
Under what circumstance can IDMS return what appears to be a false error-status code?
Release: All supported releases.
It is possible to receive false 0361, 0326 and other error status codes indicating database corruption under the following conditions:
RETRIEVAL NOLOCK is a performance option. It improves the performance of retrieval transactions.
With RETRIEVAL NOLOCK in effect, no locks are kept for records retrieved by a program which readies an area in shared retrieval usage mode.
However, with this option in effect there is nothing to stop another transaction from updating the records accessed by the retrieval transaction.
A program which has readied the area in update usage mode could modify, erase, connect or disconnect the same record at the same time. The set pointers in the record prefix could be modified by the update program after the retrieval program has read the record. If you try to navigate a set, the record you are trying to access may no longer be there or no longer participating in the set. If it is an index set the index structure (SR8 records) could have been modified as well. It is also possible for the retrieval transaction to access records that have been updated by another program but not yet committed. This can lead to all sorts of error status conditions. This is the trade-off for the increased performance you get from not setting locks for retrieval transactions.
This situation can also happen when a program is running against a retrieval CV when the same records are being updated in the update CV at the same time.
Change RETRIEVAL NOLOCK to RETRIEVAL LOCK in the SYSGEN
OR
Change the program to use PROTECTED RETRIEVAL or SHARED UPDATE usage mode.
For errors in a retrieval CV the only solution is to rerun the program.
For a discussion of the different ready usage modes see IDMS documentation section Readying Areas. Also see section System Locking Within Central Version which discusses RETRIEVAL NOLOCK.
See section SYSTEM Statement Parameters Information on specifying the RETRIEVAL NOLOCK option.