Abend 3018 when varying an area from Update to Offline or Retrieval

Document ID : KB000029397
Last Modified Date : 14/02/2018
Show Technical Document Details

 In response to a DCMT VARY AREA command to vary the Area status from Update to Offline or Retrieval you could see the error:

 3018 Error Closing AREA segment.area

 This means that something outside of the IDMS CV has turned off the IN USE for UPDATE flag in the first page of the Area that was set when the area was put into UPDATE mode by the CV (at startup if the Area is defined to be set to UPDATE at startup,  or when varied from Offline or Retrieval to Update).

 When the CV sets an area status to UPDATE, it reads the first page of the area and sets an IN USE for UPDATE flag in the page footer and writes it back to the dataset.

 This prevents any other job from readying the Area in update mode.  

 If you are going to perform some maintenance against the area, you must always vary the area Offline or Retrieval in the CV.

 If you mistakenly run the local batch UNLOCK utility while CV has the Area in Update mode you turn this flag off, BUT since you did not Vary the Area Off/Ret first, the CV still considers the Area locked for Update.  The area is now vulnerable to be corrupted since no IN USE LOCK is set and the CV as well as other jobs or CVs would be able to update simultaneously.

 Another way this could happen would be if you FORMAT the Area, or RESTORE the Area while the CV has it locked for Update. Either of these is much more serious and could result in a corrupted database that requires manual recovery.


  If you encounter the 3018 error it is recommended to shutdown the CV ASAP and investigate what caused the IN USE for UPDATE flag to be turned off and recover accordingly.