IDMS force buffer write

Document ID : KB000103409
Last Modified Date : 26/06/2018
Show Technical Document Details
Question:
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 ? 
Answer:
There are a couple of different features that can be used for sharing data across CV. 

1. Shared Cache 
For more information, see here: 
https://docops.ca.com/ca-idms/19/en/administrating/administrating-ca-idms-system-operations/ca-idms-in-a-sysplex-environment/using-shared-cache 

2. Data Sharing 
For more information, see here: 
https://docops.ca.com/ca-idms/19/en/administrating/administrating-ca-idms-system-operations/ca-idms-in-a-sysplex-environment/data-sharing 

3. VARY AREA PURGE 
Which we will focus on for this article.
DCMT VARY AREA area-name PURGE    or
DCMT VARY SEGMENT segment-name PURGE
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: 
https://docops.ca.com/ca-idms-ref/19/en/ca-idms-system-tasks-and-operator-commands/dcmt-vary-commands/dcmt-vary-area