i think U will get return code 8 IN VSAM RETURN CODE. But in joblog u can see in VSAM FEEDBACK CODE. it will have the value 80 when u r trying to delete a record from ESDS.
SELECT Statement-FILE STATUS IS WS-FILE-STAT1,WS-FILE-STAT2
WS-FILE-STAT1 should be defined as PIC X(02) in working storage
WS-FILE-STAT2 can be coded for VSAM files to get the VSAM return code, VSAM function-code and VSAM feedback code.
This is a 6- byte field in working storage.
FILE STATUS IS VSAM-STATUS-CODE, VSAM-EXTENDED-STATUS-CODE.