Module 13: CICS Recovery, Restart and Production Support
File Problems
Most CICS applications live in VSAM files, so file problems are the most common production calls. The abend code on the READ, WRITE, REWRITE or DELETE usually points straight at the cause.
Common file abend codes
- AEIS (NOTOPEN) - the file is closed. AEIM (NOTFND) - the record key was not found. AEIO (DUPKEY) / AEIN (DUPREC) - duplicate key on WRITE.
- AEIQ (IOERR) - a VSAM I/O error, often a damaged file. AEIR (NOSPACE) - the file or its dataset is full.
- AFCV - the request could not get a record-level lock; another task holds the record.
- Always code RESP (or HANDLE CONDITION) on file commands so these become handled conditions instead of task abends.
Opening and checking a file
- Check a file's state with CEMT INQUIRE FILE, and open a closed file with:-EXEC CICS
SET FILE('CUSTMAS') OPEN
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT = DFHRESP(NORMAL)
MOVE 'File CUSTMAS could not be opened.' TO MSGO
END-IF. - Before opening, find out why it closed - a file that closed itself due to errors will likely fail again.
- A file left DISABLED after maintenance must be re-enabled as well as opened.
VSAM-level problems
- A damaged VSAM file needs IDCAMS VERIFY, and if that fails, restore from backup and reapply changes from the forward recovery log.
- A full file (NOSPACE) needs a larger allocation or a reorganization - monitor file space before users hit the error.
- Record locks (AFCV) that never clear usually mean a task died holding them; find the task and resolve it.
