Will definitely help people who will search on this topic and end up at this page.
Except your answer is misleading and only partially correct.
Once a record is written to an ESDS, there will be data located starting at that RBA as long as the ESDS data set exists. Saying
record can be deleted from ESDS dataset
is not a correct statement. If the application is coded to designate a bit or byte as indicating the record is invalid, then the application can treat the record as deleted even though there is still data in the record. This is what you call
Record can be marked as deactivated record
If the application is not coded to do this, then it will read the data and treat it as valid. The record being marked as "deactivated" is an APPLICATION convention and has nothing to do with the reality of what is stored in the ESDS data set. Some applications will replace the data in the "deactivated" record with LOW-VALUES or HIGH-VALUES (X'00' or X'FF') to prevent attempting to use the data for anything.
The only way to truly delete data from an ESDS is to unload the data into another data set, delete and define the ESDS, and load back the desired data into the ESDS (skipping the records that are to be deleted from the ESDS either on the unload or the reload).