IDMS force buffer write

Document ID : KB000103409
Last Modified Date : 26/06/2018
Show Technical Document Details
In our environment one of the IDMS areas is shared between two CV regions. i.e. the physical dataset of the area is shared between CV01 and CV02 regions. The area in CV01 region is always in Update mode and the area in CV02 region is always in Retrieval mode . 

The problem is sometimes when the area is accessed in CV016 region, we get the old data not the most recent updated data. How we can avoid this kind of issue ? 
There are a couple of different features that can be used for sharing data across CV. 

1. Shared Cache 
For more information, see here: 

2. Data Sharing 
For more information, see here: 

Which we will focus on for this article.
DCMT VARY AREA area-name PURGE    or
This flushes the buffers associated with the specified area or segment, forcing a new read on the next access of the record. 
You will need to issue the VARY AREA PURGE in the retrieval cv, to update its buffers. 
You don't want all updates done to the database, you only want those rununits that have finished in the update CV, since some updates may be rolled out. 
Once the update rununit on the update CV completes (issues a FINISH or RollBack) , the buffer pages associated with that rununit are all written to disk. 
When you do the purge in the RET CV, it will only get updates that completed prior to the purge. 
You may need to do the purge several times throughout the day, depending on your processing. Shared cache is a better solution but this procedure can work, but the VARY PURGEs would need to be coordinated with the update rununits finishes. 
For more information, see here: