Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
I am inserting records in VSAM dataset through a MANTIS program. But I m not able to see the records in DSLIST(3.4) of TSO. I am sure that the records are succesfully getting inserted because when I add same record again from program it gives DUPREC error. Even in other utilities i am not able to see the records. I tried in DITTO & MASTERCAT.
Does this have anything to do with the structure of VSAM dataset? Becuase when next day I browse the dataset i am able to see the records. Is there anything which I am missing to understand about the peculiarity of VSAM? PLease guide!
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
I don?t have any knowledge of MANTIS programs, so I cannot comment directly. However, I do have an idea, in general terms, as to what may be happening. I my research I find that MANTIS is a 4GL application development program that can run in Batch or under CICS. Is this correct?
Your MANTIS application is running in batch or is it running under CICS?
I have run across conditions similar to what you are experiencing from time to time over the years, and it usually turns out to be a timing problem with committing the changes to the VSAM file. Particularly, if it?s running under CICS.
The problem, as I have experienced it is as follows:
Two programs program-A, and program-B are active and running accessing the same VSAM ?FILE-01?.
Both programs have done accesses that loaded the VSAM index into each of the programs regions. Program-A does an update to the VSAM ?FILE-01? that either adds or deletes a record, thereby changing the VSAM index. Program-B accesses the VSAM ?FILE-01? on the updated record, and either ?sees? a deleted row, or cannot see an inserted row because the VSAM index in the program-Bs region has not been updated. In the case of a CICS transaction, CICS may not have flushed the buffer yet, where no other application would be able to ?see? the new inserted record, but another CICS transaction, because it would have the updated indexes, would be able to ?see? the updated record.
Now the next day, all of the updates to VSAM ?FILE-01? would have been committed to the file and are now visible to all applications.
I don?t know if this is the cause of your problem, but I do know that this type of scenario does exist.
I hope this some insight to what might be happening.
Maybe someone more knowledgeable than I will chime in with some ideas.