Updating QSAM files

You can update QSAM files only if they reside on direct access storage devices. You cannot update files in the z/OS® UNIX file system.

Replace an existing record with another record of the same length by doing these steps:

  1. Open the file as I-O.
  2. Use REWRITE to update an existing record. (The last file processing statement before REWRITE must have been a successful READ statement.)

You cannot open as I-O an extended format data set that you allocate in compressed format.

related references  
REWRITE statement (Enterprise COBOL for z/OS Language Reference)