You can update QSAM files only if they reside on direct access storage devices. You cannot update files in the HFS.
Replace an existing record with another record of the same length by doing these steps:
You cannot open as I-O an extended format data set that you allocate in compressed format.
related references
REWRITE statement (Enterprise COBOL Language Reference)